First off, love this application - it is fantastic - use it everyday and am trying to figure out how to get even more out of it by scripting...
Unfortunately my AppleScripting skills arent near mad yet, so having some problems..
Wrote a Hazel rule to move movie files after im done with them.
I want the rule to run *only* if an external drive is currently attached and mounted.
- Code: Select all
tell application "Finder"
set external_disk to "tuals 2TB"
set diskExists to false
set hazelStop to false
try
if exists disk external_disk then
set diskExists to true
else if diskExists is false then
set hazelStop to true
end if
end try
end tell
hazelStop doesnt seem to be stopping hazel; as I get multiple 'cannot move X file to tuals 2TB' notifications via Growl whenever Im not at home (connected to the tuals 2B disk).
This AppleScript works running from ScriptEditor; and i even threw in a couple dialog notifications to be sure...No problem works as expected...
Any thoughts or amazing script fu?