Re: Two things I noticed in a simple Finder script
Re: Two things I noticed in a simple Finder script
- Subject: Re: Two things I noticed in a simple Finder script
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 02 Jun 2001 14:07:28 -0700
On 6/2/01 8:47 AM, "Jan Pieter Kunst" <email@hidden> wrote:
>
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 = {}
Use a try block:
set x to container window of folder ...
set y to container windows -- gives {} if there are no open windows
try
if y contains x then ...
on error -- if you want to
beep
display dialog "Sorry. There are no open windows."
end try
I don't know if there's a solution to the popup windows tab positioning,
sorry.
--
Paul Berkowitz