hi,
Ive found a website that allows me to send sms messages using a URL. So ive been writing a small script to take advantage of this, however when i go to run the app it throws up a unicode error and so doesnt want to play ball.
Can anyone identify where i have gone wrong? :
(*
Opens and compiles an sms text message to be sent over the web.
*)
property reciever : "number"
property text_to_be_sent : "Look i sent a text from my computer!"
property start_URL : "https://myaccount.voipcheap.com/clx/sendsms.php?username=username&password=password&from=number&to="
set reciever to display dialog "Who do you want to recieve the text" default answer reciever buttons {"Cancel", "Continue"} default button 2
property text_node : "&text="
set text_to_be_sent to display dialog "What do you want the text to say?" default answer text_to_be_sent buttons {"Cancel", "Continue"} default button 2
set target_URL to start_URL & reciever & text_node & text_to_be_sent
open location target_URL
display dialog returns a record {text returned:“”, button returned:“”},
you have to specify the text returned part
(*
Opens and compiles an sms text message to be sent over the web.
*)
property reciever : "number"
property text_to_be_sent : "Look i sent a text from my computer!"
property start_URL : "https://myaccount.voipcheap.com/clx/sendsms.php?username=username&password=password&from=number&to="
set reciever to text returned of (display dialog "Who do you want to recieve the text" default answer reciever buttons {"Cancel", "Continue"} default button 2)
property text_node : "&text="
set text_to_be_sent to text returned of (display dialog "What do you want the text to say?" default answer text_to_be_sent buttons {"Cancel", "Continue"} default button 2)
set target_URL to start_URL & reciever & text_node & text_to_be_sent
open location target_URL
Fantastic, thank you
Would their be a way to run this from Terminal? So type sms_online.script followed by number followed by the message? or is that wishful thinking?
If not, would their be a way to close the opened window after the http request has been sent?