Re: Strange error...
Re: Strange error...
- Subject: Re: Strange error...
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 5 Aug 2005 14:23:08 -0400
I'm seeing that behavior as well, and I suspect it has to do with the
way the "bounds" property is defined. In particular, I note that
this works:
tell application "Finder"
set winLeft to item 1 of (get bounds of first window)
end tell
Someone else can perhaps shed some light on why.
BTW, what OS are you running? I'm on Panther here at work, and wonder
if it works without the "get" on Tiger . . .
On 8/5/05, Glenn Sugden <email@hidden> wrote:
> It's early, I'm fighting a cold, but this just doesn't seem to
> make any sense - I'm sure there's an obvious reason for it, which
> makes me wonder if I'm suddenly missing something fundamental about
> AppleScripting (or just that the cold medicine dropping my IQ):
>
> Tell Application "Finder"
> set winBounds to bounds of first window
> set winLeft to item 1 of winBounds
> End Tell
>
> Works correctly, however:
>
> Tell Application "Finder"
> set winLeft to item 1 of (bounds of first window)
> End Tell
>
> Results in: Finder got an error: Can't get item 1 of bounds of
> window 1.
>
> FWIW, so does: set winLeft to (item 1 of (bounds of first window))
>
> What the heck am I missing here?
>
> FWIW, of course this works: set winLeft to item 1 of {1, 2, 3, 4}
>
> Thanks in advance,
>
> ::Glenn
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden