• 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 react to browser window-name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to react to browser window-name
      • From: Matthew Smith <email@hidden>
    • Re: How to react to browser window-name
      • From: Peter Watling <email@hidden>
  • Prev by Date: Re: Search Archives! Help Full
  • Next by Date: Re: Arcane date smarts (Was: Getting a folder based on creation
  • Previous by thread: Re: Parsing HTML
  • Next by thread: Re: How to react to browser window-name
  • Index(es):
    • Date
    • Thread