how to prevent "script timeouts"?
how to prevent "script timeouts"?
- Subject: how to prevent "script timeouts"?
- From: email@hidden
- Date: Tue, 27 Nov 2001 12:13:10 EST
I've got an "on idle" script (below) that I've compiled as a Run-Only app
with the "Stay Open" checkbox active. The purpose of this script is to
detect when the web-page the user is on contains the title "quitme", and then
it quits IE. The problem is that if the user stays in IE for a long time
without going to the "quitme" page, the AppleScript times out on it's own.
Is there a way I can prevent this from occurring?
on idle
tell application "Finder"
set allApps to processes
copy 0 to foundflag
repeat with anApp in allApps
if name of anApp is "Internet Explorer" then
copy 1 to foundflag
end if
end repeat
if foundflag = 1 then
tell application "Internet Explorer"
repeat with eachWindow in ListWindows
if "quitme" is in text item 2 of (GetWindowInfo
eachWindow) then
-- display dialog "quitme was found!!"
quit
tell me to quit
end if
end repeat
return 2
end tell
else
-- quit if IE isn't around
tell me to quit
end if
end tell
end idle