• 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
Re: Detect an URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect an URL


  • Subject: Re: Detect an URL
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 13 Mar 2001 09:03:00 -0800

On 3/13/01 5:20 AM, "Timothy Bates" <email@hidden> wrote:

> you want something like this
>
> on idle
> tell application "Internet Explorer"
> set winList to ListWindows
> set info to GetWindowInfo (item 1 of winList)
> set theURL to item 1 of info
> if theURL = "http://www.google.com/"; then
> tell me to display dialog "you are in google"
> else
> tell me to display dialog theURL as string
> end if
> end tell
> end idle
>
> PS: you were using words which have special meanings (like URL, and assuming
> that a window 1 existed.


I don't use idle handlers much, but I think that that's missing a 'return'
statement, saying how often it should be run? One reason why Nuria's
original script wasn't doing what she hoped was that - although it 'stays
open' - it only ran once, when first double-clicked. Probably she'd like it
to run every few seconds or every second, So, just above the 'end idle' line
at the bottom, I think it needs

return 1 -- or return 5

--
Paul Berkowitz


References: 
 >Re: Detect an URL (From: Timothy Bates <email@hidden>)

  • Prev by Date: Re: trim_line problems
  • Next by Date: Re: Solved: Script's Stack Overflowed???
  • Previous by thread: Re: Detect an URL
  • Next by thread: Re: Detect an URL
  • Index(es):
    • Date
    • Thread