Friday, September 08, 2006

Refreshing Finder with the keyboard

Simon blogged about how to use a small piece of applescript to refresh the Finder window using an automator action.

Here's an extension to this functionality that makes it even better.

Take the existing applescript:


tell application "Finder"
tell front window
update every item with necessity
end tell
end tell
Save this to a file in your ~/scripts folder under a name like "refresh.scpt".


Use the application Quicksilver to assign a trigger and key combination to the script and you can use something like "Command-R" to refresh the window - works beautifully.

You can find Quicksilver here (link: http://quicksilver.blacktree.com/).

Thanks to the original poster of the applescript: Eric "Heavyboots".

2 comments:

Miles said...

could you provide a few more details on how to set up this command in os x? i sort of figured out how to create the script, but my familiarity stops there with QS. can you explain how to take the script and create the trigger and the action to assign the refresh to apple R, for example. thanks in advance

Narbs said...

Sure...
Click on the QuickSilver icon (looks like a Q) on the menu bar. Choose QuickSilver, Triggers. Choose Custom Triggers tab on the left then click the + sign on the bottom of the dialog to add a new hotkey. Type in ~ in the search box then work your way down from your home directory to choose the script refresh.scpt. The action defaults to Run. Double-click the Trigger column and a side-pane will appear on the left. Choose the keys you want (like Apple-R). Close the dialog (ESC). You should be able to press Apple-R now.

Hope that helps.