PDA

View Full Version : Copy File Icons




i.shaun
May 25, 2009, 12:30 AM
'm trying to make a dropplet that takes a file (image) dropped into it, and copies the icon to the clipboard.

I previously set the image itself as it's own icon using CocoThumbX. My intention is to copy icons from files faster -- and if possible, have another that does the reverse (pastes custom icon on file dropped in).



Anyway, so far I have this:


on open files_
tell application "Finder"
set files_ to POSIX path of files_
get icon of files_
copy it to clipboard


end tell

end open


I get error: Can't get <class iimg> of "<path to file>"


I attempted a command "do shellscript" but when messing with Terminal, I could not get it to do anything to the file. It too would say "access denied".