AppleScript That Saves Finder Window Size and Location

I wrote the following AppleScript to position and size Finder windows, but the Finder doesn't "remember" the settings the next time I open the windows.
tell application "Finder"
activate
make new Finder window to disk "Hard Drive"
set toolbar visible of Finder window 1 to false
set current view of Finder window 1 to icon view
clean up Finder window 1 by name
set position of Finder window 1 to {30, 55}
set bounds of Finder window 1 to {30, 55, 400, 625}
make new Finder window to folder " Files" of disk "Hard Drive"
set current view of Finder window 1 to icon view
set toolbar visible of Finder window 1 to false
clean up Finder window 1 by name
set position of Finder window 1 to {410, 55}
set bounds of Finder window 1 to {410, 55, 975, 455}
close Finder window 1
close Finder window 1
end tell
How do I make it so the Finder will remember the location and position?

Hello
Here is a script that I use daily.
The code used to force the Finder to "remember" the window position seems a bit tricky. If I remember well I found it on MacScripter.
As far as the Finder is not corrected, we must use this kind of trickery.
--[SCRIPT]
my commun(choose folder)
on open (sel)
my commun(sel's item 1)
end open
(* set bounds to {10, 50, 800, 600} *)
on commun(F)
set F to F as Unicode text
tell application "Finder"
if class of item F is document file then set F to (container of item F) as Unicode text
if ((class of item F) is folder) then my set_bounds(F, {10, 50, 800, 600}, false)
end tell
end commun
on set_bounds(F, b, toolbar)
local ao, i, lesFichiers, fichier
tell application "Finder" to tell folder F
set lesFichiers to every file
repeat with fichier in lesFichiers
my saveImageWithItselfAsIcon(fichier as alias)
end repeat
tell container window
set ao to class is Finder window
open
set current view to icon view
set properties of its icon view options to ¬
{arrangement:arranged by name, icon size:128}
set bounds to b
set toolbar visible to toolbar
set toolbar visible to not toolbar
set toolbar visible to toolbar
if not ao then close
end tell -- to container window
repeat with i in (get folders)
my set_bounds((i as alias), b, toolbar)
end repeat
end tell -- to folder F then to Finder
end set_bounds
on saveImageWithItselfAsIcon(F)
tell application "Image Events"
launch
try
tell (open F)
try
save with icon -- save iconimagefile with itself as icon
end try
close
end tell
end try
end tell
end saveImageWithItselfAsIcon
--[/SCRIPT]
Yvan KOENIG (from FRANCE mardi 13 mars 2007 20:51:14)

Similar Messages

  • Finder window size and location not remembered

    I have OS X 10.10 installed.
    When I press Cmd/shift/H to open a finder window showing my home folder I get the default location and size for the window.  I resize and relocated the window and close it.  When I press that key combination again, the window is now showing the new size and location I previous set.  Unfortunately, when I restart the computer, this modification is lost and when I press that key combination the window opens with the default size and location.
    I have used the key combination of Cmd/Shift/A to open a finder window showing Applications and Cmd/Shift/U to open a finder window showing the Utilities folder.  I have been successful in resizing and relocating these windows, and having the system remember my modifications after a restart.  It appears to only be the Cmd/Shift/H combination that is faulty.
    Any ideas how to fix this problem?

    Paddster7,
    You could try trashing the hidden file inside the folder that stores some of its positioning and size settings.
    To show your hidden files.
    Launch ( Terminal ) -> Paste in the following ( defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder ) -> Press Return.
    Open the ( Offending Folder ) -> Delete ( .DS_Store ) -> Restart -> Move folder how you want to to stay -> Restart -> Did it stay?
    To reverse your hidden files back to hidden.
    Launch ( Terminal ) -> Paste in the following ( defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder ) -> Press Return.
    Supporting Articles
    http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/
    http://en.wikipedia.org/wiki/.DS_Store
    Hope that helps,
    Weston

  • How to keep default Finder window size and location from Mac server

    Working in an office of three people.  Mac mini server (not sure of the OS; I think it's Snow Leopard).  We each use iMacs with Mavericks.  I have my default new Finder window set to open "customers" folder, which resides on the server, in a specific orientation.  If either of my co-workers opens "customers" and resizes that window on their machines, it retains that size & location when I open it again on my machine (as I'm sure it does to them after I "fix" my own window).
    Is there any way to change this so that one's own machine will remember the window prefs?  I mean, we're not opening on the server itself, so in my mind it should not retain the last open position, right?
    I know I could set my default folder to Home, then go to customers from the sidebar, but that almost defeats the purpose of the default folder.
    thanks in advance!!

    Hey Macdaddy,
    This happens all the time with our server at work. The server window never opens in the same place twice, and it can be annoying.
    There are third-party window management tools out there, but what I did was use a macro program called Keyboard Maestro (since I already owned it).
    Among the many things Keyboard Maestro can do is manipulate a window. I created a macro that moves it to a specific point (in my case, the upper left corner of the screen) and then resizes it to a specific width and height in pixels. I then assigned the macro a keyboard shortcut.
    Now, when I mount the server, I can use the keyboard shortcut and the window is right where I want it.
    There are other programs that just move windows, and I tried a couple. But Keyboard Maestro is more elegant in my opinion, and it does a whole lot more if you choose to go that route.
    Hope this helps.
    Andy

  • Finder Window Sizes and View Options

    In an earlier message under Mac OS X Panther it was recommended that I post a new message in the AppleScript forum.
    I'm looking for a way to automate the repetitive task of resizing Finder windows and resetting view options. For example resetting a hundred folders to the same window size and screen position with the same view options. This requires manually adjusting each window one by one.
    A solution could be an AppleScript that would automate this task.
    The following is the earlier message:
    http://discussions.apple.com/message.jspa?messageID=1283081#1283081
    I mistakenly deleted all the preference files for the Finder window options on my 17 inch PowerBook (.DS_Store Files).
    This has returned all Finder windows to default settings for window sizes and view options.
    I use custom widow sizes for all my folders that nicely fit the 17 inch screen on my PowerBook, leaving enough desktop space on the right for the hard drive icons and the Dock that I always keep vertical on the right.
    I have a 12 inch PowerBook as well. And it has it's own custom window size that fits it's much smaller screen. It has always been a complaint of mine to have to manually reset windows whenever I needed to transfer folders with Bluetooth file exchange.
    Resetting Finder window sizes and view option has always been a time consuming problem. Now to have to do it over again for hundreds of windows is a huge task that is way to manual.
    The Finder is customizable. There must be a way to set the options for one window and be able to use those adjustments for other windows without having to re adjust each setting manually.
    There was an application called Finder Window Manager. Maybe someone knows of another application that can do this of task or another way around this issue.
    Photoscene
    Powerbook G4 17 inch   Mac OS X (10.4.3)   Tiger/Panther

    Photoscene,
    I think if you repost this to the AppleScript link, someone there will have a solution for you (in the form of an applescript that you can run)...
    http://discussions.apple.com/forum.jspa?forumID=724
    Give it a shot (I'm not clever enough to give you a good script yet, but someone there will be!)
    Bob

  • Finder windows size and position etc.  on clients' machines

    How to configure server's finder windows size and position etc. are on clients' machines so that they persist? Thank you!
    PS: If this has already been discussed, please refer to the thread. Sorry for double post in that case.

    Try connecting to the Share as the Server Admin, make your window the size and position you want and logout again.
    This information is stored in the .DS file.
    Message was edited by: Patrick Savelberg (Private)

  • What Preferences Control Window Size and Location?

    I have a number of windows that over time have taken on weird sizes and locations. For example, a print window habitually shows up with the print button underneath the dock, forcing me to move the window to click on the options.
    Is there a preference I can trash--or anything else I can do--to return the sizes and locations of windows to something resembling normal?

    That's done by each individual application.
    Many will remember where the window last was, and re-open it in the same place & size.
    Find the preference file for the app in question (probably in <your home folder>/Library/Preferences folder), quit the app, rename the file (append "old") to the end, and start the app again.
    The window should open in a default location; move/and or resize it, close the app and open it again. If that fixes the problem, trash the "old" file and re-enter any other preferences.
    If it doesn't fix it, you've probably got the wrong file. Close the app. If there's a new version of the file you renamed, delete it. Remove the "old" from the previous one.

  • How do you save main window size and placement upon boot-up?

    Is there any way for a dual-monitor user to convince InDesign to remember the size and shape of the main window when I boot up?  I use InDesign on my second monitor, which I have rotated to portrait mode.  The workspace I have saved remembers all of my menues and panels, but the main window always shows up on my main monitor.  InDesign 5 remembered....
    Also, how do you permanently turn off that damn "getting started" window?
    Thanks.

    I'm guessing your on a Mac with a recent version of Mac OS X. Am I correct?
    You'll have the best luck having InDesign remember your window size if you choose Window > Application Frame. Then resize the frame to the size you prefer. It should stick.
    People have found bugs with windows on a secondary monitor if they're using Mac OS X 10.10.2. If you're running 10.10.3 it should solve that problem.
    To get rid of the Getting Started window, scroll to the bottom of most tabs, and choose not show the window again by checking a checkbox.

  • Save finder window size

    anyone know how to permanently enlarge and position the FINDER window?
    no one could figure it out in the Apple store one to one nor w/ tech support..
    When I open any icon on desktop am trying to force the new folder/window to permanently stay in a large screen mode with enlarged COLUMNs?
    thanks!

    I don't think you can keep the column sizes, but it should reopen to the same size.
    If it is not, the .DS_Store file is either corrupt or you don't have access to it.
    The file is hidden inside each folder where you have set specific display options.
    Try deleting the file in those folders, then try to set them up as you wish.
    If you don't know how to use the Terminal, the way I find hidden files is to enable the file visibility search criteria.
    Open the Folder and type cmd-F to bring up the search criteria. In the Kind popup menu, select Other...
    Find the File Visibility Item and check the checkbox. While there, add the System Files option, also.
    Pick File visibility from the menu and choose Invisible Items from the other popup menu.
    You should then see the .DS_Store file and you can delete it from there.
    Close the window, then reopen and set the display options as you like.

  • 'save as' finder window settings and size (on mac)

    Hi there ~
    Whenever saving/downloading any type of file from any firefox tab, and the 'save as' window opens and I choose where I want the file to be downloaded to, the finder window columns are really tight and narrow, cutting off the folder names so I constantly have to stretch out that first column so I can see the folder names .. this only happens in firefox and the finder window is always squooshed, even if I adjust it and then close/relaunch firefox .. how can I permanently set the finder window settings to avoid having to manually adjust it each time?
    thanks

    Tom Dignam wrote:
    Am I one of a very few who feel compelled to verify a filing after a "Save as" command by having >reopen the Finder?
    Probably not the only one... the OS 9 Finder way did slow things down a bit. But it may be a helpful feature for some. Best if you could activate or not. You can file a feature request here Mac OS X Feedback
    -mj

  • How can I customize window size and have it stay that way? It automatically maximizes the moment I click anywhere on the page.

    I have added a large widescreen monitor and now have a two-screen set up. This taxed my old video card, so we replaced that, too. Then I updated Firefox. Now my window automatically maximizes. "Restore" is the same size as "Maximize", and I can resize it if I carefully drag and drop all four corners. But if I click on the top bar to relocate the resized window, it re-maximizes. I can't find any options or settings that allow me to fix the window size, lock a customized window size, etc. IE8 is not doing this, so I don't think it's the monitor or desktop settings.

    Window sizes and positions are stored in [http://kb.mozillazine.org/localstore.rdf localstore.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder].<br />
    <br />
    Delete localstore.rdf or rename the file to localstore.rdf.sav in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] to test if the file is corrupted.<br />
    See http://kb.mozillazine.org/Corrupt_localstore.rdf<br />
    (caution: do not delete the localstore.rdf file in the Firefox program installation folder)<br />
    <br />
    Note:<br />
    Deleting the file [http://kb.mozillazine.org/localstore.rdf localstore.rdf] will reset the customizations of the toolbars to the defaults.<br />
    You can rename "localstore.rdf" to "localstore.rdf.sav" to test if that solves it.<br />
    Then you can restore the customization by copying "localstore.rdf.sav" to "localstore.rdf" if it didn't work.

  • Find Backup Size And Backup Window

    Hi Guys,
    Can any one give script to find backup size and backup window (total time taken to conduct backup).
    I am using Oracle 10gR2 on sun solaris 5.8
    Backup-RMAN Full backup every day.
    Regards

    Hi,
    backup size
    what do you mean by backup size .. ??
    User show all to list out the configuration details;
    Thanks
    Pavan Kumar N
    Message was edited by:
    Pavan Kumar

  • How to change Default Finder Windows Size?

    Hi all:
    New Finder windows show Macintosh HD and there is no problem in keeping the size or view options every time I open a new window (command + N).
    I can change "New Finder windows show" to another folder and works just as well.
    But when I open a folder in a new window (double click on an icon folder) the size of the window is very small and different from the window displayed by using command + N.
    Finder saves and applies default view options to all windows without a problem, but not the default size or in other words: 
    default windows size is different from new finder windows size.
    In Snow Leopard I could change default size of all windows holding down the Shift key while dragging and changing the size but in Mountain Lion it does not work.
    I have also deleted all files .DS_Store but neither works.
    I searched a lot but can not find a solution to this problem.
    Thanks.

    As far as New Finder Windows (command+N) are concerned, there's no problem.
    All other folder's Finder Windows I have not modified manually are displayed with the default size shown in the attached image. That is the window size that I want to modify.
    Thanks.

  • Finder windows sizing and alternatives

    Does anyone know how to set the default width of the finder window column style to wider? It's so small I end up opening it up every time I use it.
    Or does anyone know of a better file manager?
    Thanks

    There is a trick to setting default window size and position in the OS X "Finder" - default as in what applies to windows for which that hasn't been set before - and it is to open a new window, and without selecting anything in the window, arranging the window to you liking, then immediately closing the window.
    With that in mind, try setting column width in "column view" by dragging the "resize bar" at the base of the column while holding down the "option" (⌥) key. Though it will have to be set independently, the same procedure seems to work for "column view" in eg. "Open" or "Save" dialogues as well.
    I should mention that I'm on a 10.4 machine right now but haven't double checked to see if it works in "Panther" (this being the 10.3 section and all)...

  • Fixed finder window size

    I was wondering if there is a setting for opening a finder window?
    it would be great to have fixed size and location if I open a new finder window ...
    would be an improvement of my workflow and avoid to resize each new finder-window to my preference manually ; )
    does anybody know how to set this in either a preference file or with the terminal?
    BIG thanks in advance for any input!

    I just did a search at macupdate.com for the term "finder window".  Mixed in with a bunch of mis-hits there's some that potentially might do what you want (e.g., Finder Window Manager, Windown, Intelligent Windows).  I personally have no knowledge of any of those of if they do exactly what you want.  I'm just basing this on what I see in the one line descriptions in the search results.
    As for any settings in the finder itself, no, there isn't any.  The finder always "thinks" it knows what you want and what's best for you (yes, I'm being sarcastic if it isn't obvious)!

  • Camera Raw cache size and location

    I've been using ACR for about 3 years now, and today it occurred to me that I'm not that sure I know what the cache is actually used for. I mean, I know what a cache is, but what is ACR caching, and why?
    I use Bridge for most of my photo work, displaying high quality thumbnails and previews, often full-screen ("monitor-sized previews" by default). Bridge has its own cache, which I understand contains jpegs of thumbnails, previews, and 100% views. Does ACR's cache have any bearing on Bridge's behaviour and performance, especially with thousands of raw images?
    What sort of size and location of ACR cache should I be using - what factors do I need to consider?

    Hi,
    I'm still not sure what size of cache I should use, and what are the advantages and disadvantages of bigger or smaller ACR caches.
    Maybe Eric can tell something indeep about the impact of a large cache.  I'm not sure about that myself, but don't believe a larger cache is a real disadvantage, as long the disk on which it reside is maintained: defrag often). Since Bridge and ACR work hand in hand here, it might depend to your workflow and to your hardware. Sorry, I can't give a clear answer here.
    As said I would put it just large enough for a certain number of RAW or some weeks work. Means, when there is a chance I'ld touch a certain RAW in six weeks again, than six weeks * x images per day I shoot.
    Not sure if you are a Pro. I'm not and usually have not much new images every month.  I always was fine with the default settings.
    I don't work with Bridge and open one RAW after another in ACR, or maybe 20+ in a row when doing panorama ;-)
    But Bridge has to do a lot of work on the fly when it generates the previews for all new RAW in a folder, like: "read the image from HDD", "process it by ACR, "write Bridge previews and metadata to HDD", "write to ACR cache " - not necessarily in this order.
    And it seems it does this and some additional steps always (not only when first time reading RAW), because it f.e. needs to check if there are already processing information in ACR database or XMP file for a RAW or if they have been created in "meantime". Means ACR settings could have be changed after Bridge did a first time generation of the cache data, maybe because the RAW was openene directly via PS or by another app.
    this process is fairly processor-dependent, especially now that ACR uses more sophisticated processing in version 6, and, depending on ACR defaults, this can be significantly slower than in previous versions.
    And Bridges eats huge amount of memory as well - seems it holds a lot of information in memory before flushing it to disk.
    After reading this post of yours I made a test with my 12k RAW the other day. I tried to let Bridge create previews for all of them in one step, but it ended up complaining that there is not enough memory after ~ half an hour.
    Bridge appears to generate previews unnecessarily sometimes, because every image is already cached.
    See above. Bridge/ACR checks for updated processing information in XMP or ACR database and metadata updates. If it find some it might need to rebuild its cached image.
    Why would I need to reset the cache with a new monitor profile? Surely this is not applied to cache JPEGs?
    You are right, sorry I mixed things up here :-(  I meant ACR camera profiles. Aside that I changed monitor profile a lot over the last weeks doing some tests, and after that Bridge often refused to start until the cache was purged…
    Your suggestion of a larger cluster size is very interesting, and I may try this when I have some spare time.
    All my disks meant for storing large files (images, music, scratch, temp-file) are formated with a larger cluster size. It speeds things up a bit.
    Supposedly Lightroom's catalogue system is superior, but I am yet to be convinced that putting all my XMP data in one basket is a good idea.
    Of course LR shares ACR's cache. I don't know much about LR, but I believe XMP are not only kept in one basket here, right? They are written to the images and in case of RAW to XMP files. Otherwise there wouldn't be an interoperability between LR and Bridge. Similar to Bridge LR stores previews in it own "cache" which is as well a folder and file based "database". Check "preferences".
    But as said I use another DAM, in which’s database all data needed for searching is kept, but I also write all metadata (IPTC,XMP) to the images, even for RAW files. By this I don't need a large ACR cache and also don't have XMP files around, which I hate. When saying database, I mean a real database, not a collection of files which are kept on disk. ;-)
    Aside other advantages, I can take my database with me on vacations and can work on my images like I do at home. I have all my keywords and categories with me in one file and when back, I just copy the database to my desktop.

Maybe you are looking for

  • ITunes Music on an External Hard Drive

    Sometime ago I put, or as you will see, thought I'd put, all my itunes music on an external hard drive, I used the instructions as outlined on the Apple website, and it all SEEMED to work fine, except that when I choose "organise library" or as it us

  • Free phone memory problem

    i have a problem with my nokia 305 with freeing space at the expense when there is nothing to delete on phone

  • I am on OS X 10.5.8 but want to upgrade to mavericks.

    I am on OS X 10.5.8 but want to upgrade to mavericks. I purchased mountain lion so I could install it and then upgrade to mavericks but can't redeem my purchase voucher as I have to do it in the Mac App Store which I can't access on 10.5.8. Can anyon

  • Notification created on date ERDAT

    Hello, When I check table QMEL for ERDAT (Created on), the newer notification shows older dates than the older notification. e.g. Notification ...... ERDAT (created on) 200000131 ..... 12.07.2009 200000134 ..... 14.07.2009 200000138 ..... 14.07.2009

  • Problem installing ora9i (ins_net_client.mk)

    Hi, if I try to install oracle9i on my Debia system (glibc-2.2.3,gcc-2.95.2,gcc-3.0) I get following error: [p3x2lx:lib]$ make -f ins_net_client.mk Building client shared library libclntsh.so ... Call script /opt/oracle/9.0.1/bin/genclntsh ... /opt/o