vbscript to javascript

Discussion in 'Javascript' started by tnhoe, Dec 17, 2005.

  1. tnhoe

    tnhoe Guest

    Hi,plz help me to translate following VBscript to Javascript :- Set objGsmOut = CreateObject( "ActiveXperts.GsmOut" )
    objGsmOut.Device = "MultiTech GSM MultiModem" ' Use MultiTech's Windows Telephony device
    objGsmOut.MessageRecipient = "+31624896641" ' Recipient's mobile number
    objGsmOut.MessageData = "Hello, world!" ' SMS message text
    objGsmOut.EnterPin ( "1234" ) ' SIM card's PIN code
    objGsmOut.Send ' Send the SMS message now
    WScript.Echo "Result: " & objGsmOut.LastErrorRegardsHoe
     
    tnhoe, Dec 17, 2005
    #1
    1. Advertising

  2. tnhoe wrote:


    > plz help me to translate following VBscript to Javascript :-
    >
    > Set objGsmOut = CreateObject( "ActiveXperts.GsmOut" )
    > objGsmOut.Device = "MultiTech GSM MultiModem" ' Use MultiTech's Windows Telephony device
    > objGsmOut.MessageRecipient = "+31624896641" ' Recipient's mobile number
    > objGsmOut.MessageData = "Hello, world!" ' SMS message text
    > objGsmOut.EnterPin ( "1234" ) ' SIM card's PIN code
    > objGsmOut.Send ' Send the SMS message now
    > WScript.Echo "Result: " & objGsmOut.LastError


    var objGsmOut = WScript.CreateObject( "ActiveXperts.GsmOut" );
    //Use MultiTech's Windows Telephony device
    objGsmOut.Device = "MultiTech GSM MultiModem";
    //Recipient's mobile number
    objGsmOut.MessageRecipient = "+31624896641";
    objGsmOut.MessageData = "Kibology for all!"; //SMS message text
    objGsmOut.EnterPin( "1234" ); // SIM card's PIN code
    objGsmOut.Send(); // Send the SMS message now
    WScript.Echo("Result: " + objGsmOut.LastError)

    That assumes JScript executed with WSH (Windows Script Host).
    And I have just tried to make sense of the provided VBScript code and
    transformed that to JScript, I don't know the used object and its API at
    all.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Dec 17, 2005
    #2
    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. Jamie
    Replies:
    1
    Views:
    741
    Jamie
    Dec 5, 2003
  2. Hai Nguyen
    Replies:
    0
    Views:
    1,958
    Hai Nguyen
    Feb 26, 2004
  3. Jim Ciotuszynski

    Javascript:return vbscript equivalent

    Jim Ciotuszynski, Jul 6, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    6,639
    nescafe
    Sep 15, 2011
  4. duncan
    Replies:
    2
    Views:
    6,104
  5. William F. Robertson, Jr.

    javascript and vbscript in the same page

    William F. Robertson, Jr., Dec 7, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    6,646
    bruce barker
    Dec 7, 2004
Loading...

Share This Page