• 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: Two things I noticed in a simple Finder script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two things I noticed in a simple Finder script


  • Subject: Re: Two things I noticed in a simple Finder script
  • From: Jan Pieter Kunst <email@hidden>
  • Date: Sun, 03 Jun 2001 13:30:22 +0200

Nigel Garvey (email@hidden) schreef op 03-06-2001 12:50 :

> Jan Pieter Kunst wrote on Sat, 02 Jun 2001 17:47:01 +0200:
>
>> Another thing I noticed is that if there are no windows open, I can't use
>> Applescript to check if a certain window is open without getting into some
>> infinite loop. In other words, this:
>>
>>
>> set x to container window of folder ...
>> set y to container windows -- gives {} if there are no open windows
>> if y contains x then ... -- script gets stuck in an infinite loop if y = {}
>
> set x to container window of folder ...
> if x exists then ...
>
> NG


That's it. Beautiful! 21 lines of code replaced by 5 lines, much faster
execution. Thank you very much!

JP


References: 
 >Re: Two things I noticed in a simple Finder script (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Two things I noticed in a simple Finder script
  • Next by Date: A reference to problem
  • Previous by thread: Re: Two things I noticed in a simple Finder script
  • Next by thread: Re: Read-Only Flag
  • Index(es):
    • Date
    • Thread