SENDING SMS VIA SMSFILE.JS

SENDING SMS VIA SMSFILE.JS SearchSearch
Author Message
DHMHTRHS MANTELLOS
New member
Username: Dimitris

Post Number: 8
Registered: 06-2009
Posted on Monday, October 05, 2009 - 01:48 pm:   

Hi

I use the command line to send my sms via the smsfile.js.My problem is that every time i must type the phones.Is anyway to retrieve the phone numbers through a txt file so i dont have to type it everytime??

Thanks for your time.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1338
Registered: 08-2008
Posted on Monday, October 05, 2009 - 04:27 pm:   

Hi,

I'm not a Windows scripting expert, but it's actually pretty easy to read data from a file within a script.

So if you have a file that contains one phone number per line, you can just loop through the file and repeat the request for each number.

I made a quick edit of the example script from:

http://www.nowsms.com/support/bulletins/tb-nowsms-008.htm

If the phone number parameter starts with "@", then we assume it is a file that contains a list of phone numbers. The script opens the file and repeats the message for each number listed in the file.

Here's the script.

text/plainsmsfile.js.txt
smsfile.js.txt (3.0 k)


--
Des
NowSMS Support
DHMHTRHS MANTELLOS
New member
Username: Dimitris

Post Number: 9
Registered: 06-2009
Posted on Friday, October 16, 2009 - 09:40 am:   

Can you provide me please the syntax of the command? because when i am typing to command line

cscript smsfile.js phone.txt sms_msg.txt

i am getting the following error:

InputError: There is no script engine for file extension ''.js''
DHMHTRHS MANTELLOS
New member
Username: Dimitris

Post Number: 10
Registered: 06-2009
Posted on Friday, October 16, 2009 - 10:59 am:   

Sorry but i solve the problem with the script engine error
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1358
Registered: 08-2008
Posted on Friday, October 16, 2009 - 01:57 pm:   

If anyone else encounters this problem, there's a good explanation of how to fix it here:

http://www-01.ibm.com/support/docview.wss?uid=swg21172559