Re: Locating A Menu Item
Re: Locating A Menu Item
- Subject: Re: Locating A Menu Item
- From: Jim Lindholm <email@hidden>
- Date: Thu, 31 Jul 2003 17:39:58 -0700
Hugo, thanks for the script. I had put one together without the error
handler... now have adopted yours and works fine except when there is
an error.
I decided to test the error handler by unplugging the telephone line.
IC displays an alert after 15-20 seconds. I dismiss the alert and the
script is dead until I recompile.
At first I thought it might have something to do with running the
script from within iKey, so I created another identical script that I
run from the Scripts Menu. When the script in iKey dies, I can reset it
by running the script from the Scripts Menu. Then I found that when the
is script run from the Scripts Menu, it also dies with the phone cord
unplugged... and I can reset it by running the iKeys script.
That leads me to the problem being somewhere in the script and since it
dies when there is an error, I'm playing around with the error handler.
Thanks again for your script... Jim
On Wednesday, Jul 30, 2003, at 06:43 US/Pacific, Hugo Benitez wrote:
>
Jim,
>
>
If you are going to use Internet Connect to connect, I suggest the
>
following script, which opens IC, check for the connection status and,
>
if idle, opens connection, waits for the connection to be status 4
>
(conneced) and quits; otherwise, if connected, it closes the
>
connection and quits:
>
>
--INTERNET CONNECTION
>
>
tell application "Internet Connect"
>
get state of status of PPP configuration "Internal Modem" --check
>
status of connection
>
if result > 0 then --connected
>
disconnect
>
else
>
try
>
with timeout of 45 seconds --try to connect for 45 seconds,
>
otherwise exit with error
>
connect
>
repeat
>
get state of status of PPP configuration "Internal Modem"
>
if (result = 4) then
>
exit repeat
>
delay 5
>
end if
>
end repeat
>
end timeout
>
on error
>
disconnect
>
end try
>
end if
>
quit
>
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.