Hi Folks,
I have a little problem by getting the input of 1 text field and 1 scroll view as variable - I have the code attached!
Background: after pressing a button the input of sms_nummer (this is the number to send the sms) and the input of text
should send a sms (textmessage) to the selected number…
if name of theObject is "sms_button" then
set portRef to serialport open modem
-- SMS senden
display dialog "I am here"
-- Speicherart der SMS setzen 1 - Text
set xstr to "at+cmgf=1" & return
serialport write xstr to portRef
delay 1
-- SMS Center setzen
set sms_center to "\"+43676021\""
set xstr to "at+csca=" & sms_center & return
serialport write xstr to portRef
delay 1
-- Telefonnummer holen:
set theNumber to text returned of text field "sms_nummer" of tab view item "Outbox" of tab view "tab" of window "main"
set sms to "\" & theNumber & \""
display dialog sms
-- Text holen
set text_sms to text returned of text view "text" of scroll view "text" of tab view item "Outbox" of tab view "tab" of window "main"
set ctrl to ASCII character 26
display dialog text_sms
set xstr to "at+cmgs=" & sms & return
serialport write xstr to portRef
serialport write text_sms to portRef
serialport write ctrl to portRef
delay 2
end if
Thanks for any suggestions and your help!
Stefan