Skip navigation

Finder Window Resize in Mountain Lion

4589 Views 20 Replies Latest reply: Jul 30, 2013 8:08 PM by fogr4 RSS
1 2 Previous Next
JohnHaeny Calculating status...
Currently Being Moderated
Aug 12, 2012 12:47 AM

Finder, Two Monitors, on one I keep a number of folders open in List View.  This suits my workflow.

In Lion we lost the the upper right hand button that switched on and off the Sidebar...OK, that changed, I can live with that.

Clearly it switches of and on by selecting the Window and View>Sidebar (off/on) or option>command S. OK..so far!

You could always resize a window by grabbing the lower right hand corner. Lion and back!! 

(Letter A...see later) Now with Mountain Lion, in List View you can only size the window height and the width only adjusts just so far (too wide, I only want to see the filenames).

Switch Sidebar on and then off again and now the right hand corner works as it always has going back eons. and I can resize the window narrower as I want it.

Again...OK as far as it goes.  Now either Reboot, Restart or just log out and in and when Finder opens you see the window you sized as you left if for just a moment and then....ZONK, WOOSH....almost as if by magic and before your eyes...it pops back to some crazy default width that is too wide so now you I am back to Letter A (see above).  As you can see you are caught in a circle never being able to get back to how this Finder Software has worked for perhaps the past 20 or so years.

I accept that I may be doing something wrong...but I can't for the life of me find it in this group and have tried every preference I can find...nothing helps.  I sincerely think this is a bug...but I'm open to being enlightened (provided I can continue to use my long standing workflow).

Thanks in advance!

Mac Pro, OS X Mountain Lion
  • Joe F. Calculating status...
    Currently Being Moderated
    Aug 14, 2012 11:37 AM (in response to JohnHaeny)

    Googling for a simple answer to this broguht me to your post.

    I like to work the same way so I took the time to come up with a script:

     

    tell application "Finder"

              set bounds of window "Applications" to {1604, 44, 1864, 1165}

    end tell

     

    That rectangle works for my MacBook 13" screen. If your resolution is less it will put the window off screen.

     

    If you want to get fancy or customize it easily use this to get the current size and location first:

     

    tell application "Finder

              get bounds of window "Applications"

    end tell

  • Joe F. Level 1 Level 1 (5 points)
    Currently Being Moderated
    Aug 14, 2012 5:19 PM (in response to JohnHaeny)

    Hi John,

     

    Since we started with OS X each release has cool new features and new little annoyances or things that don't work. Plus these days everyone is an "expert", so we get no real help from Apple and tons of bad info - maybe especially on this, the Apple "support" site.

     

    Sorry I assumed you recognized Applescript. Here's how to do it:

     

    First, make sure the Finder window you want to work with is open and set up close to what you want (ie. sidebar hidden, view as list, sort by name, etc.)

     

    Then open the AppleScript Editor app (which should be in the Utilities folder) and choose "New" from the File menu.

     

    Paste in:

     

         tell application "Finder

              get bounds of window "Applications"

         end tell

     

    Then click the "Run" button at the top of the window. It will return something like:{1604, 44, 1864, 1165}, which are the rectangular coordinates of the window "Applications". The numbers represent left side, top, right side, and bottom.

     

    That first script is just to get the start point for finding the rectangle you want to end up with.

     

    Open another New script window from the File menu and paste in:

     

                    tell application "Finder"

                                  set bounds of window "Applications" to {1604, 44, 1864, 1165} -- or whatever rectangle you want

                   end tell

     

    When you click "Run" it will set the Applications window to the rect specified. Just play with the numbers to get the exact size and location you want.

     

    I haven't tried rebooting yet, but you can save the script to run anytime, even add it to your startup items to make it run at boot time if necessary.

     

    Cheers...

  • Joe F. Level 1 Level 1 (5 points)
    Currently Being Moderated
    Aug 14, 2012 9:13 PM (in response to JohnHaeny)

    Hi John,

     

    Well, I guess it was a good thing you didn't get it right because that forced me to go in and finish the job!

     

    It turns out that it doesn't work as I originally wrote it because all kinds of weird things happen depending on whether you have sidebar and/or toolbar showing or hidden.

     

    The following script will resize the window properly but needs to be exported from AppleScript Editor as an application in order to run at start up and configure the window.

     

    So here are the steps:

     

    1 - First set your Finder window as close as you can get to what you want.

     

    2- Open AppleScript Editor, choose "New" from the File menu and paste this in the top part of the window:

     

    tell application "Finder"

              set toolbar visible of window "Applications" to true

              set toolbar visible of window "Applications" to false

              set bounds of window "Applications" to {1050, 44, 1280, 790}

    end tell

     

    Remember, the 4 numbers mean "left, top, right, bottom".

    If you want to do this for a different window, replace "Applications" with the name of your target.

    If you want to do it with more windows, just duplicate the 3 lines of "set" commands for each window name and change the 4 numbers to set that window. I haven't tried that, but it should work. If you run into a problem expanding this for more than one window, try creating and installing it as a separate application for each window.

     

    3 - Click the Run button at the top of the script window to see what will happen when the script runs.

    Adjust the 4 numbers to get the size and location you want. You can go back to the Finder and fool around with the window settings then run the script again to see the result. I'm doing this with a list window that only shows the Name field. Here is an image of the View Options you get by selecting the window and pressing command-j

    Screen Shot 2012-08-14 at 11.49.17 PM.jpg

     

    4 - Once you've set everything so that the script sets the window as you like it, choose "Export..." from the AppleScript Editor's File menu and save it as an application with the following settings:

    Screen Shot 2012-08-14 at 11.35.50 PM.jpg

     

    5 - Finally, open "System Preferences > Users & Groups" and select your login user.

    Click the Login Items tab on the right side and, click the + sign at the bottom of the list.

    It will ask you to locate the app you just exported and you'll see it in the window.

    Screen Shot 2012-08-14 at 11.18.53 PM.jpg

    It seems to me that we're only being allowed to set the window to a width which allows for the sidebar, even if it's hidden. This is working for me under Mountain Lion. It should work in any version of MacOS.

    If it stops working I'll probably be the first to know.

     

    Good luck, and I guess thanks for motivating me to fix this problem which has been bugging me too.

  • jgable Calculating status...
    Currently Being Moderated
    Sep 5, 2012 6:09 AM (in response to Joe F.)

    This is outstanding! I had the same problem and have implemented your workaround. Thank you so much!

     

    Jim Gable

  • jgable Level 1 Level 1 (0 points)
    Currently Being Moderated
    Sep 5, 2012 7:05 AM (in response to jgable)

    I also added a line in the AppleScripts to open the Applications window because the Finder no longer opens my windows on restart.

     

              open folder "Gable Mac:Applications:"

     

    as here:

     

    tell application "Finder"

              open folder "Gable Mac:Applications:"

              set toolbar visible of window "Applications" to true

              set toolbar visible of window "Applications" to false

              set bounds of window "Applications" to {4, 628, 320, 1044}

    end tell

     

    you will have to substitute the name of your hard drive to replace "Gable Mac"

  • Angele M. Florisi Calculating status...
    Currently Being Moderated
    Oct 1, 2012 2:28 PM (in response to JohnHaeny)

    I'm having the same problem.  This solution is not good for me however because I'm not writing a script for every single window on my system.  You used to be able to just press the green button in the upper left corner and the window would shrink down to it's minimum size depending on how many columns you had showing, now there is all this extra space on the right side and bottom of every single window.  Like noted above even when you get the window to resize the way you want it, once you log out the settings are gone.  THIS IS SO FRUSTRATING !!!  If anyone else has found a real answer to the problem please advise.

  • Angele M. Florisi Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 3, 2012 10:55 AM (in response to JohnHaeny)

    I sent an earlier reply that was blocked by Apple and don't know how else to reach out to you.

  • Joe F. Level 1 Level 1 (5 points)
    Currently Being Moderated
    Nov 24, 2012 9:35 PM (in response to jgable)

    Ah... I was just coming here to update and add basically the same thing to the script.

     

    Upon updating another Mac to Mountain Lion I learned that, if the Applications window isn't already open (ie. somehow got closed before a restart), then the script won't find the specified window.

     

    So I came up wth the same solution (opening the desired window), but with a generic selector for the folder:

     

       open folder "Applications" of startup disk

     


    Doing it this way makes the script work on any Mac, since it doesn't require a specific location or disc name.

     

    So my new version complete is this:

     

    tell application "Finder"

              open folder "Applications" of startup disk

              set toolbar visible of window "Applications" to true

              set toolbar visible of window "Applications" to false

              set bounds of window "Applications" to {1680, 44, 1920, 990}

    end tell

     

     

    To Angele and John - this script can simply be expanded to include any windows you like. Just repeat the 4 lines, edit the window names, and the points for the bounds rectangle.

     

    Also - I don't think people realize that AppleScript Editor will actually record your actions and create a script for you. Just press record, go to the Finder, do what you want, come back to ASE and click stop. You'll see a script that includes all the steps you took. This doesn't always work 100% but it's a great way to start learning how to write your own scripts since it provides the syntax for you. You can do an awful lot in many apps using Appscripts.

     

    Cheers

  • Ross Barkman Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 2, 2012 6:03 AM (in response to Joe F.)

    Some additional tricks for people like me who want to open a bunch of different windows and size them correctly:

     

    • In addition to startup disk, there are some other useful 'location' keywords like home for the user's home folder and trash for the Trash folder.
    • To specify folders within these locations, you need to use syntax like: open folder "Utilities" of folder "Applications" of startup disk

     

    So the script might look something like this:

     

    tell application "Finder"

            open startup disk

            set toolbar visible of window "Your Disk Name" to true

            set toolbar visible of window "Your Disk Name" to false

            set bounds of window "Your Disk Name" to {1, 47, 317, 555}

            open folder "Applications" of startup disk

            set toolbar visible of window "Applications" to true

            set toolbar visible of window "Applications" to false

            set bounds of window "Applications" to {1, 581, 317, 1089}

            open folder "Utilities" of folder "Applications" of startup disk

            set toolbar visible of window "Utilities" to true

            set toolbar visible of window "Utilities" to false

            set bounds of window "Utilities" to {322, 47, 639, 555}

            open folder "Your Folder" of folder "Documents" of home

            set toolbar visible of window "Your Folder" to true

            set toolbar visible of window "Your Folder" to false

            set bounds of window "Your Folder" to {322, 581, 639, 1089}

    end tell

     

    This stuff is probaby second nature to people familiar with AppleScript, but most Mac users will not be experienced in it - having figured it out, I thought it might be useful.

     

    Message was edited by: Ross Barkman - tidying up script formatting (WYSINWYG)

  • LookToWindward Calculating status...
    Currently Being Moderated
    Dec 22, 2012 3:59 AM (in response to Ross Barkman)

    Hi,

     

    While this will work, you should be aware that if you change the monitor resolution, the order of the monitors on multiple displays. or add another display, the coordinates that you used when the window was created may no longer be valid and may result in the window disappearing off the displays.

     

    Also with this approach, you have to modify the script for every new window you want to just behave like it has done for the past 20 years or more. If we have to resort to using scripts to just stand still then a better way would be to attach a sctipt to a folder using the Folder Actions feature. That way when you create a new window you'd position it and then run a script that attaches itself to the window. This script would be inteligent enough to know if this were the first time it was being run and if so save the current settings, and if it's not the first time, restore the saved values.

     

    It could also save the current monitor setup and if it has changed, return the window to some kind of sane default and allow the user to reposition the window for the new monitor configuration.

     

    I've done load of AppleScript programming and I will have a go at writing the above. I will post it here and if people would test it for me I'd be grateful!

     

    Dave

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (2)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.