I make a script that sends via sms the new ip of the router. The script works in terminal but it does not work when running the script.
Here is the script.
tool sms send port=usb2 channel=2 dst=6939***** message= (“The 3G-Router just reboot. Date:” .\ ([/system clock get date]).\ " - ".\ ([/system clock get time]).\ “. New Public IP:”.\ ([$myip]))
There is no declaration of $myip in the script. Is it a global variable? If so, then it should be declared (not defined) in the script also.
:global myip;
Then the rest of your script.
Insure tool has a leading slash in the script.
/tool sms …
I made another statement in the script variables and I think many! Thank stated variable and played!
I hope that means it is working now. Is that correct?
Yes, of course it works!
I would even do something.
I want to send the SMS to the router and writes the text and the number who want to send him.
Just take it to send the text to new destination.
eg: :cmd pass dst=12345 Message:blabla
qdza
December 15, 2010, 1:48pm
6
I’m interesting in this.I want ask please where i can get variables and example or tutorial how play with them ..
Thank you
mrz
December 15, 2010, 1:58pm
7
here you can find syntax and some right/wrong usage examples
http://wiki.mikrotik.com/wiki/Manual:Tools/Sms#Syntax