if pin_card does not contain "Ready" then
try
tell current application
set theAnswer to text returned of (display dialog "Bitte den Pin eingeben..." buttons {"Cancel", "OK"} default answer "")
set xstr to "at+CPIN=" & theAnswer & return
serialport write xstr to portRef
delay 1
set pin_read to serialport read portRef
delay 1
if pin_read contains "ERROR" then
display dialog "PinCode wurde falsch eingegeben!" & return & "Bitte starten Sie das Programm neu" & return buttons {"OK"}
quit theApplication
delay 1
end if
end tell
on error number -128
display dialog "Sie haben keinen PinCode eingegeben! Das Programm wird geschlossen" & return buttons {"OK"}
quit theApplication
delay 1
end try
end if
I am checking the PinCode of the SimCard in my Application and I don´t want the User to see the PinCode while entering it… I have seen that it is possible to have a Osaxen, but I would prefer to handle this without an extra Scripting Addition…
thanks for your reply and your help - its working great with Script Editor - I tried the
same in Xcode and got a failure when I try to build my application…
I will try to fix it…
Thanks for your time!
Stefan
Model: iBook G4 with 1.2GHZ
Browser: Safari 419.3
Operating System: Mac OS X (10.4)
I have tried now with a window - its working, but the problem in my application is, that the script is running while I have to enter the password - So I come to a point where the password should already be entered…
I haven’t found a solution on solving this, so I decided not to mask the password…