hey, i’m a new switcher, and i really like the winXP/linux choice of “up” as a folder action, the one which opens a folder’s parent in the same window, and i don’t know much about AppleScript, so when i tried writing a script to do this from the few example scripts i could find online, it didn’t work. Could someone possibly help me out or at least point me in the right direction to find out what the hell i’m doing? much appreciated, thanks
EDIT: I got something working, but it takes a long time, is there any way to cut this time down? it has to open up the script right now, then the finder comes back with the parent directory as it’s target, is there any way i can make this script embedded in Finder somewhere so it doesn’t have to execute it as a separate function?
Here’s what I would do. Save this to a convenient location as a stay open application.
on run
tell application "System Events" to ¬
set visible of first application process whose frontmost is true to false
end run
on reopen
try
tell application "Finder" to ¬
set target of front window to container of target of front window
on error
display dialog "That's as far as I can go!" buttons ¬
{"OK"} default button 1 with icon 0
end try
tell application "System Events" to ¬
set visible of first application process whose frontmost is true to false
end reopen
When first launched, it will do nothing but it will continue to run. Subsequent clicks on the icon in the Dock will move up one level in the frontmost Finder window. For added convenience, add it to Login Items so it’s ready to go when you log in or start the computer. The benefit of this approach is that the script will respond much quicker because it doesn’t have to launch.
You can also add (drag) the script to the toolbar in a Finder window. This makes it available in all Finder windows and it will behave the same as clicking the icon in the Dock.
hey man, i actually can’t get your script to work, i compiled it, and ran it but it doesn’t do anything, and it doesn’t stay open in the dock, don’t know what part of it was meant to keep it alive so i didn’t tinker, but copy-pasting and then compiling your source didn’t do the trick
There might be a better solution to this already built into every window in Mac OS X, you can command+click on a windows title to traverse its path. (command is the Apple key next to the space bar)
Also, If you right click (or control click for one button mice) on a windows tool bar then go to “Customize Toolbar”, or go to the ‘View’ menu and pull down to “Customize Toolbar”. There is a widget named “Path”, just drag it to the postition in the toolbar you want and you’ll be able to navigate the directory hierarchy from there. Either way is much faster than any scripting method.