vbscript to javascript

T

tnhoe

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
 
M

Martin Honnen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top