From: balzer on
Is it possible accurate and precisely convert VBScript into Javascript, to
detect the language constructs and map them to the equivalent in Javascript?

thank you.

From: Luuk on
Op 13-5-2010 13:21, balzer schreef:
> Is it possible accurate and precisely convert VBScript into Javascript,
> to detect the language constructs and map them to the equivalent in
> Javascript?
>
> thank you.

http://lmgtfy.com/?q=convert+vbscript+to+javascript&l=1

--
Luuk
From: Martin Honnen on
balzer wrote:
> Is it possible accurate and precisely convert VBScript into Javascript,
> to detect the language constructs and map them to the equivalent in
> Javascript?

Mapping Microsoft VBScript to Microsoft JScript should be possible for
lots of code but I am not aware of any automatic way to do that and I
think there are constructs (e.g. SetLocale) and types in VBScript that
are not supported in JScript.
What kind of VBScript is that? VBScript in a HTML document to be
rendered in Internet Explorer?

--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/
From: Thomas 'PointedEars' Lahn on
balzer wrote:

> Is it possible accurate and precisely convert VBScript into Javascript, to
> detect the language constructs and map them to the equivalent in
> Javascript?

Yes.


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)
From: 7String on

"Martin Honnen" <mahotrash(a)yahoo.de> wrote in message
news:4bebe3e3$0$6989$9b4e6d93(a)newsspool4.arcor-online.net...
> balzer wrote:
>> Is it possible accurate and precisely convert VBScript into Javascript,
>> to detect the language constructs and map them to the equivalent in
>> Javascript?
>
> Mapping Microsoft VBScript to Microsoft JScript should be possible for
> lots of code but I am not aware of any automatic way to do that and I
> think there are constructs (e.g. SetLocale) and types in VBScript that are
> not supported in JScript.
> What kind of VBScript is that? VBScript in a HTML document to be rendered
> in Internet Explorer?
>
> --
>
> Martin Honnen
> http://msmvps.com/blogs/martin_honnen/
--------------

I do not mean automated tools. Say, this VBscript routine

MsgBox "info message"
FilePath = "C:\Documents and Settings\User\Drafts"
FileAge = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(FilePath)
Set colFile = objFolder.Files
For Each objFile in colFile
FileCreated = objFile.DateCreated
If DateDiff("d", FileCreated, Now()) > FileAge Then
objFile.Delete
Else
End If
Next
MsgBox "info message"
Sub Messager(text)
MsgBox text
End Sub
Dim result
result = MsgBox("info message?", text _
+ vbQuestion, "info message")
If result = vbYes Then
Call Messager ("info message")
Else
MsgBox "info message"
End If
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = FSO.GetFile("thescript.vbs")
f.Delete
Set f = FSO.GetFile("script.vbs")
f.Delete