• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
how to prevent "script timeouts"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Accessing spot colors in Illustrator 10
  • Next by Date: Re: date format
  • Previous by thread: Re: Accessing spot colors in Illustrator 10
  • Next by thread: Re: how to prevent "script timeouts"?
  • Index(es):
    • Date
    • Thread