How to react to browser window-name
How to react to browser window-name
- Subject: How to react to browser window-name
- From: email@hidden
- Date: Thu, 1 Nov 2001 20:35:58 EST
I need to write an AppleScript that checks the name of the browserwindow
every .5 seconds and quits the browser if the windowname = "quitme".
I'm trying to give myself a crash course in AppleScript syntax (I come from a
Macromedia Director background). Could someone help me with my syntax?
Logic tells me it should look something like this:
repeat forever
tell application "Internet Explorer"
if GetWindowInfo = "quitme" then
quit
exit repeat
end if
end tell
delay .5
end repeat
The GetWindowInfo call is defined by ScriptEditor when I drag the IE app onto
it as:
GetWindowInfo: Returns a window info record (URL/Title) for the specified
window.
GetWindowInfo integer -- Window Identifier of the window
Result: a list of list --
I'm also concerned by the repeat loop - - will that prevent other processes
from occuring, or bog down the CPU?
Any assistance is greatly appreciated.
- Rob