Help running a script with Hazel

I have this script from a friend. When run on a selected torrent file it pops up a window asking if I want to open the file (on this computer), or if I want to move it to a different computer to be opened there (once an option has been selected it runs 1 of 2 different Automator workflows saved as applications). It works fine if I select the torrent file in my Downloads folder and run the script from Script Editor, but I can't get it to work automatically through Hazel. Here's the script
I tried changing 'to open the selection using' to 'to open theFile using' but it didn't work (I don't really know AppleScript).
Is there any way I can get this working?
- Code: Select all
set TheChoice to (display dialog "Choose an Action" buttons {"Cancel", "Open Torrent File", "Move File to Power Mac"} cancel button "Cancel")
if button returned of TheChoice is "Open Torrent File" then
tell application "Finder" to open the selection using "Macintosh HD:Users:Jono:Documents:Open the Torrent file.app"
else
if button returned of TheChoice is "Move File to Power Mac" then
tell application "Finder" to open the selection using "Macintosh HD:Users:Jono:Documents:Send Torrent to Power Mac.app"
end if
end if
I tried changing 'to open the selection using' to 'to open theFile using' but it didn't work (I don't really know AppleScript).
Is there any way I can get this working?
