• 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: Positioning a Finder window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Positioning a Finder window


  • Subject: Re: Positioning a Finder window
  • From: Emile Schwarz <email@hidden>
  • Date: Sat, 09 Jan 2010 11:28:05 +0100

Hi Jim,

this happens to me with 10.3 (?) and 10.4 (more or less).

Now, it happens to me with both a MacBook Unibody (2008-11) and a MacBook Pro Unibody (2009-10), the window opens 20 pixels below the MenuBar and 20 pixels from the screen left.

I've tested on a Mac reseller’s iMac and this worked fine (10.6.2)...

The used code (extract from a larger script) is:

tell application "Finder"
-- keyboard shortcut
set fw to front window

-- place the window at x = 0 and below the MenuBar…
set position of fw to {0, 44}
end tell

I checked this code with a MacBook Unibody (2008-11) / MacOS X 10.5.8 before sending it.

HTH,

Emile


Le 08/01/10 17:59, email@hidden a écrit :
Message: 9
Date: Fri, 8 Jan 2010 07:18:44 -0600
From: Jim Brandt<email@hidden>
Subject: Positioning a Finder window
To:email@hidden
Message-ID:<email@hidden>
Content-Type: text/plain; charset="us-ascii"

I have a window positioning question.

How do I set the position of a window from a script and make it be
retained?

I'll explain.

Using this script:

     tell application "Finder"
        set nm to name of front window
        set bounds of window nm to {470, 120, 1220, 500}
     end tell

I can change the position of the frontmost Finder window. Once I close
the window and then reopen it, however, it goes back to the original
position.
If I position it manually(drag it to a new location), close it and
reopen it, the
new position is retained.

BTW, I also tried this, but it makes no difference:

     tell application "Finder"
        set nm to name of front window
        set bounds of Finder window nm to {470, 120, 1220, 500}
     end tell

So, how do I position a window in a script such that the position is
retained
when the window is closed and then reopened?

Also, where is this kind of stuff documented? Is the only way to find
out
about it by trial and error or does Apple have documentation on this?

TIA,

Jim


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: Snow Leopard osax security and 'run script' with parameters
  • Next by Date: Re: Snow Leopard osax security and 'run script' with parameters
  • Previous by thread: Re: Positioning a Finder window
  • Next by thread: RE: Snow Leopard osax security and 'run script' with parameters
  • Index(es):
    • Date
    • Thread