convert VBScript into Javascript

Discussion in 'Javascript' started by balzer, May 13, 2010.

  1. balzer

    balzer Guest

    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.
     
    balzer, May 13, 2010
    #1
    1. Advertising

  2. balzer

    Luuk Guest

    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
     
    Luuk, May 13, 2010
    #2
    1. Advertising

  3. 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/
     
    Martin Honnen, May 13, 2010
    #3
  4. 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$> (2004)
     
    Thomas 'PointedEars' Lahn, May 13, 2010
    #4
  5. balzer

    7String Guest

    "Martin Honnen" <> wrote in message
    news:4bebe3e3$0$6989$-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
     
    7String, May 13, 2010
    #5
  6. balzer

    Evertjan. Guest

    Thomas 'PointedEars' Lahn wrote on 13 mei 2010 in comp.lang.javascript:

    > 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.
    >


    Noooh.

    The Q is not clear. It seems to be two Q:

    1
    >> Is it possible accurateLY and precisely convert VBScript into
    >> Javascript


    This is not possible. [depending on the platforms used, and the different
    interpreters]

    2
    >> Is it possible to detect the language constructs and map them to the
    >> equivalent in Javascript?


    "mapping language constructs" ?????

    With what would these constriucts, presumably in VBs, be detected?
    With a programme in C++ perhaps? [or JS or VBS?]

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., May 13, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    634
  2. Jonas Daunoravicius
    Replies:
    5
    Views:
    315
    Peter
    Jul 17, 2003
  3. Jonas Daunoravicius
    Replies:
    5
    Views:
    287
    Peter
    Jul 17, 2003
  4. David

    Convert from VBScript...

    David, Aug 2, 2004, in forum: Javascript
    Replies:
    6
    Views:
    184
    Dr John Stockton
    Aug 3, 2004
  5. Replies:
    2
    Views:
    147
    Dr John Stockton
    Oct 17, 2005
Loading...

Share This Page