1628 Views 6 Replies Latest reply: Jul 23, 2010 6:52 PM by Fraky
Hey... I completely underestimated AppleScript... wow. What a fun thing that is. I had never used it before.
OK... here's what I've came up with as a solution for me. Maybe this will work for someone else too.
I'm looking for a super fast easy way to cut copy and paste the path of any given file
Here's the code I'm using. Niel... I took your code and added to it a touch.
tell application "Finder"
set currentPath to (POSIX path of (selection as alias))
set the clipboard to currentPath
This copies the path of 1 selected file to the clipboard.
I saved this script as an application. I was hoping to hotkey it as an application (sftcmdc) but whenever I tried to set it up in my hotkey preferences my system preferences would crash?
I read that you can leave the app on the desktop and drop your selected file onto it... this would cause the application to run.
I didn't want to leave this app as an icon on my desktop and have to drop the file onto it to get it to work- as my software GUI takes up all that real-estate. I didn't want to have to move windows around and then drop the icon, and then move the windows back... you get the idea.
I have the magic mouse and I've always used use MagicPrefs to give it some more functionality. You can set certain swipes of the fingers on the mouse to run applications. I set a 1 finger swipe to the right to run the above application. It worked like a charm!
So now all I have to do to copy the path of any file is: Navigate to the file> Click on it> Swipe my mouse finger to the right and then cmd+v away.
Thanks for you help guys. Any ideas why system preferences was crashing as I was trying to set this ApplesScript application to run when hotkeyed? I would rather have this app work as a hotkey but the mouse swipe isn't bad.