Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An easy way to identify specific docked document icons' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An easy way to identify specific docked document icons
Authored by: PizzaCake on Sep 15, '08 12:03:58PM

I've created an applescript which takes away much of the pain of adding custom icons to files.

How it works

In Finder:
Select the file you wish to add a custom icon too.

Run the applescript application (I keep it in my dock)

The quick look window will appear for the selected file.

A screen capture blue highlight box with camera icon will also show.

Move your mouse cursor over the quick look window and press the left mouse button.

The screen capture is saved to the clipboard.

A Get Info window for the item pops up.

Select the little icon in the top left corner of this window.

CMD-v i.e. paste keyboard shortcut

The Get Info window automatically closes after three seconds. (this can be increased easily by amending the delay 3 in the applescript to whatever number of seconds you prefer)

Job done. Takes a whole lot longer to explain, it's quite fast in reality.

Here's the applescript.

tell application "Finder"
activate
tell application "System Events"
keystroke space
do shell script "/usr/sbin/screencapture -ciwoT0 "
keystroke space
keystroke "i" using command down
delay 3
keystroke "w" using command down
end tell
end tell

Copy into script editor and save as applescript application. Put in your Dock or Finder toolbar etc.



[ Reply to This | # ]
An easy way to identify specific docked document icons
Authored by: PizzaCake on Sep 15, '08 12:09:06PM

Just thought of a little speed up so you don't have to press CMD-v

Here's the new version:

tell application "Finder"
activate
tell application "System Events"
keystroke space
do shell script "/usr/sbin/screencapture -ciwoT0 "
keystroke space
keystroke "i" using command down
delay 3
keystroke "v" using command down
keystroke "w" using command down
end tell
end tell



[ Reply to This | # ]
An easy way to identify specific docked document icons
Authored by: Anonymous on Sep 15, '08 04:26:57PM

The paste event should really come before the delay, otherwise it behaves weird.



[ Reply to This | # ]
An easy way to identify specific docked document icons
Authored by: PizzaCake on Sep 16, '08 10:19:12AM

The paste event has to come after the delay because you have to have time to select the icon in the top left of the get info window, then the script pastes the contents of the clipboard as a custom icon for the file. I've just tried the script again and it works fine on my Mac running Leopard. But if the script works better for you your way then that's the way it should run.



[ Reply to This | # ]
An easy way to identify specific docked document icons
Authored by: PizzaCake on Sep 17, '08 01:55:22AM

Hopefully the final version. You don't have to select the icon in the get info window anymore as I found out the tab key does this. Therefore, no delay is required.

tell application "Finder"
activate
tell application "System Events"
keystroke space
do shell script "/usr/sbin/screencapture -ciwoT0 "
keystroke space
keystroke "i" using command down
keystroke tab
keystroke "v" using command down
keystroke "w" using command down
end tell
end tell



[ Reply to This | # ]