Re: Bounds?
Re: Bounds?
- Subject: Re: Bounds?
- From: "Marc K. Myers" <email@hidden>
- Date: Tue, 02 Jan 2001 01:57:16 -0500
- Organization: [very little]
Sal wrote:
>
Date: Mon, 01 Jan 2001 20:13:32 -0800
>
From: Sal <email@hidden>
>
Subject: Bounds?
>
To: Apple Script <email@hidden>
>
>
Hi, All!
>
>
Beginner's question number 2: Why won't this work?
>
>
tell application "Finder"
>
set bounds of front window to {10, 40, 200, 100}
>
end tell
>
>
I get an error saying that Finder can't set the window bounds to those
>
coordinates (or any others, which I've tried). Also tried sayng "window 1"
>
(and "window 2"), to no avail. I've already started to think the computer
>
just doesn't like me :-(
It works fine if you've got a folder open, otherwise there is no front
window. This is fun:
tell application "Finder"
set {l, t} to {0, 0}
repeat until (l > 640 or t > 480)
set {l, t, r, b} to bounds of front window
set bounds of front window to {l + 50, t + 50, r + 50, b + 50}
end repeat
end tell
Put you folder window in the upper left corner of the screen and it will
make the window move diagonally down the screen.
Marc [1/2/01 1:57:07 AM]