-- http://sms.toolbar.google.com/send/sms?client=unknown&numsms=2035704096&carriersms=TMOBILE&msgsms=test&sendsms=Send+message - This is the desired format of the URL. I kept it here to refer back to or copy out in-between parts. -- these dialog's capture the data for the message set digits to text returned of (display dialog "Phone Number?" default answer "9195551212" buttons {"OK"} default button {"OK"}) as string set carrier to (choose from list {"VERIZON", "SPRINT", "TMOBILE", "CINGULAR_4", "CINGULAR", "VIRGIN", "ALLTEL", "CELLULARONE", "OMNIPOINT", "QWEST"} with prompt "Carrier: \r \r (use CINGULAR_4 for old AT&T)") as string set message to text returned of (display dialog "Message?" default answer "this is a test" buttons {"OK"} default button {"OK"}) as string set msg to "" -- the following block converts the spaces to +'s by splitting the words into list componenents and reassembling the list back together set AppleScript's text item delimiters to space set messagelist to every text item in message set msg to "" set n to 0 repeat (the number of text items in messagelist) times set n to (n + 1) set msg to (msg & (item n of messagelist) & "+") end repeat set n to count of characters in msg set msg2 to (text from the first character to character (n - 1) of msg) -- this combines the URL parts with the variables in preperation to send via Safari. set baseurl to "http://sms.toolbar.google.com/send/sms?client=unknown&numsms=" & digits & "&carriersms=" & carrier & "&msgsms=" & msg2 & "&sendsms=Send+message" -- submits the message tell application "Safari" set thisscript to "window.open('" & baseurl & "')" do JavaScript thisscript in document 1 end tell