• 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: How do I get the Finder window layout correct?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get the Finder window layout correct?


  • Subject: Re: How do I get the Finder window layout correct?
  • From: Mike Fischer <email@hidden>
  • Date: Thu, 15 Jun 2006 19:36:59 +0200

Hi Wayne!

-- this poop is to fix a Finder bug. It wont record the size of the window without a mouseclick
set loop to true
activate
repeat while loop is true
display dialog "click grow box" giving up after 2
if button returned of result is "ok" then
set loop to false
else
delay 2
end if
end repeat

Yes, that did the trick. Thanks! Now I've got to figure out, how to do this without manual interaction...

I was a bit premature with this comment. Yes it does cause the window size to be saved but no it doesn't save the size I set. Instead it saves the size the window was zoomed to which is not what I want.


For my basic test I want to place a single item in a window sized to 290 x 105 pixels. The item is supposed to be centered horizontally. This makes the window wider than the minimum size the zoom button zooms to. The narrow zoomed state is ugly though because it doesn't leave enough space to properly show the window title. In a second application I want a second item below the first, again horizantally centered in a window with height 197 and the same width as before.

So far I have not found a way to get around this limitation using AppleScript. I tried the following:

- Setting a background image of the appropriate size and hoping the zoom would go to the size of the image. Nope, zoom doesn't give a hoot about the background image.

- Creating and deleting an object (a folder) on the volume. No dice.

- Try to set the window zoomed or zoomed full size properties of the window. Yields AppleScript errors. Apparently these properties are not settable contrary to the comments in the AppleScript dictionary of the Finder.


The only way remotely successful was to create two additional (empty) files in the source folder for the disk image, position them on the r/ w image in such a way that the zoom button a) doesn't move the other items and b) zooms to the size I want and then deleting them after the zoom was performed. Getting the positions right seems to be black magic though. And I seem to need to click the zoom button twice for this to work.



While experimenting with this method I found another weird Finder bug: A file revealed in the terminal by renaming an existing invisible ".something" to "something" will not be seen by the Finders AppleScript interface unless it has been "shown" to the Finder by clicking on it in a Finder window. This pseudo hidden attribute is also copied to the r/w disk image. The item in question will not have an index property (missing value) and will not be included in the list generated by 'get every item of window x'. However it can be accessed by name like this 'get item named "something" of window x'. Unfortunatly I can't reproduce the bug right now so filing it would be rather pointless.



Mike -- Mike Fischer Softwareentwicklung, EDV-Beratung Schulung, Vertrieb Web: <http://homepage.mac.com/mike_fischer/index.html> Note: I read this list in digest mode! Send me a private copy for faster responses.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: How do I get the Finder window layout correct? (From: Mike Fischer <email@hidden>)

  • Prev by Date: [BETA] Iceberg 1.2
  • Next by Date: After installing our package, 10.2 chokes on some things.
  • Previous by thread: Re: How do I get the Finder window layout correct?
  • Next by thread: Re: How do I get the Finder window layout correct?
  • Index(es):
    • Date
    • Thread