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: Andy Wylie <email@hidden>
- Date: Sun, 03 Jun 2001 10:40:37 +1200
on 3/6/01 9:07 AM, Paul Berkowitz at email@hidden wrote:
>
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.
Akua's 'reposition window'
_____________________________ Andy