Hazel trigger Automator workflow problem

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

Moderator: Mr_Noodle

Hazel trigger Automator workflow problem Fri Oct 21, 2011 5:35 am • by tbperu
Hazel wont trigger Automator workflow.

1. I made a Automator workflow (quit program (Transmission) - works when played from Automator).
2. Then told Hazel to monitor the “Temp Dowload folder”. (The idea is to make Hazel quit Transmission when there is no more temp downloads - all downloads complete.)
3. Used this workflow settings:
If all of the ….......
Number of objects (in folder) is blank (also tried less than 1 combination instead)
Do the following:
Run Auto workfl “quiti transmission”

Also tried to trigger a Transmission quit by telling Hazel to quit if folder is of little or no data size, also doing the Automator script.

Nothing happens at all! I have tried Run script function in Hazel. Nothing pops up in the script window when I’m running this script.

The funny thing is that Hazel monitors an other folder, which triggers Transmission to open when Torrent file is added to my dropbox. It works perfectly. I did it exacly the same way as described above, only with “numb of obj is more than 1” instead.

What am I missing here! It should be surch a straight forward thing. Is the use of Auto workflows in combination with Hazel an unstable thing?

Greatfull for all help, going crazy...
tbperu
 
Posts: 3
Joined: Fri Oct 21, 2011 5:11 am

Check the logs. Go to the Info section and click "View Log". See if there were any errors and report back.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Hazel trigger Automator workflow problem Tue Nov 01, 2011 7:11 pm • by tbperu
There are some errors in the log, but they dont make any sense to me.

I don't think making Hazel running the Automator workflow is the problem. It's rather making Hazel execute a behavior on a folder that turns emty.
I've tried different approaches, like asking program to quit when adding a certain kind of colored file, and this works out fine.
I'm just simply? trying to make Hazel quit transmission when folder turns emty.

Is it a too "static" thing too ask Hazel, to monitor a folder and act when folder turns emty? (Hidden files problem?)
Is it possible to make it act when no files are at a certain color, in fact no files at all? Didn't work for me..

Maybe sombody could give me an example on how this would happen...
tbperu
 
Posts: 3
Joined: Fri Oct 21, 2011 5:11 am

If you have Hazel monitor the folder that contains the folder you are interested in, you can set up a rule to match folders which are empty, either by checking their size or using Spotlights "Number of items" attribute. I suggest giving that a try.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Hazel trigger Automator workflow problem Wed Nov 02, 2011 5:17 pm • by tbperu
Thanks Mr Noodle for quick replies!!!!:-)

I'll try to illustrate my problem again, but this time I paste my log transcript here for you to read, if you have time:-). To make it easier to read and understand, I made an example on ending Evernote program when "Evernote test folder" gets emty.

(The way I tested the rule was to move a file in and out of the Evernote test folder manually (drag'n drop). Nothing happens. Secondly I used the "run rules" test command. Same result. At the end of this message you can see what the log says when I ran the "run rules command".

Here is my Hazel settings:
Description: End evernote

If "any" of the following conditions...
- Size is less than 7 bytes (it's a hidden file in the folder that is 6 bytes)
- Number of objects is less than 2 (made it 2 because of the hidden file)

Do the following:
Automator workflow - End Evernote.workflow (works when played from Automator)


Markering - 2. nov. 2011 22:12:58
2011-11-02 22:13:04.519 (null)[0] DEBUG: Program is licensed.
2011-11-02 22:13:04.522 hazelfolderwatch[2168] DEBUG: Error reading file /Users/tombobperu/Library/Application Support/Firefox/profiles.ini: Error Domain=NSCocoaErrorDomain Code=260 "The file “profiles.ini” couldn’t be opened because there is no such file." UserInfo=0x10032a420 {NSFilePath=/Users/tombobperu/Library/Application Support/Firefox/profiles.ini, NSUnderlyingError=0x10032a2c0 "The operation couldn’t be completed. No such file or directory"}
2011-11-02 22:13:04.522 hazelfolderwatch[2168] DEBUG: Error reading file /Users/tombobperu/Library/Application Support/Flock/profiles.ini: Error Domain=NSCocoaErrorDomain Code=260 "The file “profiles.ini” couldn’t be opened because there is no such file." UserInfo=0x1003307b0 {NSFilePath=/Users/tombobperu/Library/Application Support/Flock/profiles.ini, NSUnderlyingError=0x100330420 "The operation couldn’t be completed. No such file or directory"}
2011-11-02 22:13:04.528 hazelfolderwatch[2168] DEBUG: Could not resolve alias. Old path: (null) Error: -50
2011-11-02 22:13:04.528 hazelfolderwatch[2168] DEBUG: Could not resolve alias. Old path: (null) Error: -50
2011-11-02 22:13:04.528 hazelfolderwatch[2168] DEBUG: Initialized
2011-11-02 22:13:04.528 hazelfolderwatch[2168] DEBUG: Pausing to wait for things to settle down.
2011-11-02 22:13:06.530 hazelfolderwatch[2168] DEBUG: Processing directories: (
"/Users/tombobperu/Downloads/Evernote test folder"
)
2011-11-02 22:13:06.530 hazelfolderwatch[2168] DEBUG: About to process directory /Users/tombobperu/Downloads/Evernote test folder
2011-11-02 22:13:06.531 hazelfolderwatch[2168] DEBUG: Directory /Users/tombobperu/Downloads/Evernote test folder processed.
2011-11-02 22:13:06.531 hazelfolderwatch[2168] DEBUG: Sleeping
2011-11-02 22:13:08.531 hazelfolderwatch[2168] DEBUG: Done
tbperu
 
Posts: 3
Joined: Fri Oct 21, 2011 5:11 am

You need to have Hazel monitor the folder above the Evernote one. The rules apply to the contents of the monitored folder, not the monitored folder itself.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron