• 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: Bounds?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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]


  • Prev by Date: Re: applescript-users digest, Vol 2 #174 - 12 msgs
  • Next by Date: Re: Website?
  • Previous by thread: Re: Bounds?
  • Next by thread: Re: How to start an apple event
  • Index(es):
    • Date
    • Thread