Hi, I'm new to AppleScript but would like to create a new system-wide keyboard shortcut via an Automator Service that runs an AppleScript.
The script creates a duplicate Finder window. It looks like this:
I got the script from here:
http://hints.macworld.com/article.php?story=20080108144434753
I learned how to create a new Service here:
http://apple.stackexchange.com/questions/40885/how-to-make-this-kind-of-global-hotkey
The only thing I did differently than in the tutorial is I am obviously using Run Apple Script instead of Run Shell Script.
I've set:
Service receives [no input] in [any application].
Then I went to System Preferences and added the shortcut for my new Service, "Duplicate Finder Window" but nothing happens when I hit the keyboard shortcut. However it works fine when I click Run from Automator.
Any ideas why?
The script creates a duplicate Finder window. It looks like this:
Code:
try
tell application "Finder"
activate
set this_folder to (the target of the front window) as alias
set {x1, y1} to position of front window
make new Finder window to this_folder
set position of front window to {(x1 + 50), (y1 + 150)} --This offsets the new window more than the average Finder tiling does
end tell
end try
I got the script from here:
http://hints.macworld.com/article.php?story=20080108144434753
I learned how to create a new Service here:
http://apple.stackexchange.com/questions/40885/how-to-make-this-kind-of-global-hotkey
The only thing I did differently than in the tutorial is I am obviously using Run Apple Script instead of Run Shell Script.
I've set:
Service receives [no input] in [any application].
Then I went to System Preferences and added the shortcut for my new Service, "Duplicate Finder Window" but nothing happens when I hit the keyboard shortcut. However it works fine when I click Run from Automator.
Any ideas why?