Hi Folks,
Using Scripting Additions I am able to connect do my modem and send ATCommands to the device!
http://mysite.verizon.net/vzenuoqe/MacSoft.html
this script works pretty fine - alltough I kindly ask you to help me solving this:
serialport list
shows the connected devices
set portRef to serialport open "/dev/cu.HUAWEIMobile-Modem"
if portRef is equal to -1 then
display dialog "Could not connect to port"
else
delay 1
set xstr to "at+cops?" & return
serialport write xstr to portRef
delay 1
set show to serialport read portRef for 35 --shows 35 digits
display dialog show
serialport close portRef
end if
The Output is now:
at+cops?
+cops: 0,0,“T-Mobile A”,
Question:
How can I cut out everything in this variable xstr exept “T-Mobile A”
Thanks for your help!
Best Regards,
Stefan