hazelStop not stopping Hazel

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

hazelStop not stopping Hazel Mon Apr 12, 2010 3:27 pm • by textuals
hello!

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?
textuals
 
Posts: 2
Joined: Fri Apr 09, 2010 1:56 pm

Re: hazelStop not stopping Hazel Tue Apr 13, 2010 1:34 pm • by Mr_Noodle
Check the help. You don't set a variable called hazelStop but instead you have to return a record wth hazelStop as a key.
Code: Select all
return {hazelStop:true}

Give that a try.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support