Martin Honnen said:
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?
--------------
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