Author |
Post |
|
#1 Tue Dec 07, 2010 14:28, 169 months ago.
|
Member
Registered: Dec 2010
Location: United Kingdom
|
I would like to create/translate sendsms to vbs file, so it cn be run from widows on, and not just the cygwin
any ideas
thanks
|
|
#2 Wed Dec 08, 2010 13:22, 169 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Instead of creating a new vbs file, try this idea: In the Cygwin create a new file /usr/local/bin/win_sendsms with the following content: # PATH is required when called from Windows: export PATH=/usr/local/bin:/usr/bin:/bin
# Call sendsms: /usr/local/bin/sendsms 'bash' Syntax Highlight powered by GeSHi Then create a shortcut in Windows into some directory. Name it as Sendsms and set target to: c:\Cygwin\bin\bash.exe /usr/local/bin/win_sendsmsChange the Cygwin installation folder if necessary, and notice slashes and backslashes.
|
|
#3 Fri Dec 17, 2010 11:58, 169 months ago.
|
Member
Registered: Dec 2010
Location: United Kingdom
Topic owner
|
I sent up a folder called scripts and saved the file as sendsms.bat added scripts folder to system path.
All is working Ok
The only issue I have now is if I run the script with variables, the details are not carried accross
C:\Scrips\> sendsms 440000000000 "message" Destination(s): _
So it looks as if I have not entered the details,
thanks
|
|
#4 Fri Dec 17, 2010 19:40, 169 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
In sendsms.bat add arguments to the call:
c:\Cygwin\bin\bash.exe /usr/local/bin/win_sendsms %1 %2
In /usr/local/bin/win_sendsms add arguments too:
/usr/local/bin/sendsms "$1" "$2"
After those additions this should work, but with single recipient only. If your application needs to send the same message to more than one recipient, it should call the batch file as many times as required.
|