SENDING SMS VIA SMSFILE.JS | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through December 23, 2009 ⬆ |
◄ ► |
Author | Message | ||||
DHMHTRHS MANTELLOS New member Username: Dimitris Post Number: 8 Registered: 06-2009 |
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 |
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.
-- Des NowSMS Support | ||||
DHMHTRHS MANTELLOS New member Username: Dimitris Post Number: 9 Registered: 06-2009 |
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 |
Sorry but i solve the problem with the script engine error | ||||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 1358 Registered: 08-2008 |
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 |