rule matched, but not executing on 4.01 (worked on previous)

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

Moderator: Mr_Noodle

Hi all...
i have various rules on hazel and all were working on 3.8, but now only 1 does not work consistently on 4.01

this part always works:
i have a folder - Process_iFlicks (which sits inside my download folder)
when new video comes in - iFlicks is opened by hazel applescript
iFlicks - processes video file and deletes it after it is complete

this part worked all the time on previous release
when Process_iFlicks is empty (or equals 0 files) - then it closes iFlicks (using hazel applescript)

now on 4.01
i can see that the rule matched... but the rule does not get processed and it does not close iFlicks
however, if i run the rule manually, then it will close iFlicks.

Has something changed in 4.01 that is preventing the rule to execute? do i need to reset some timer?
chulo
 
Posts: 3
Joined: Tue Apr 01, 2014 7:36 am

I don't think so. If it runs when you run it manually, then there may be a file events problem. First rename the folder then rename it back and see if that fixes it. If not try the following:

- Export your rules
- Remove the folder from Hazel
- Add the folder back in
- Import your rules and re-enable as necessary.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:I don't think so. If it runs when you run it manually, then there may be a file events problem. First rename the folder then rename it back and see if that fixes it. If not try the following:

- Export your rules
- Remove the folder from Hazel
- Add the folder back in
- Import your rules and re-enable as necessary.


I have the same issue as the OP. Everything worked fine in Hazel 3.x but since updating to Hazel 4.x it only works when I run the rules manually. This is the rule I have: http://imgur.com/qFxkLPN

Basically it just goes through all the subfolders and add the files to iTunes. If it already exists in iTunes, no problem since no duplicates will be made, but if it doesn't exist it will add it. This worked fine in Hazel 3.x but not now. The log looks like this when Hazel runs the rule on it's own:

2016-05-11 23:16:56.770 hazelworker[2017] ###CK load address: 0x10e2f3000
2016-05-11 23:16:56.801 hazelworker[2017] Processing folder Serier
2016-05-11 23:16:58.823 hazelworker[2017] Done processing folder Serier
2016-05-11 23:17:11.769 hazelworker[2018] ###main load address: 0x104a21000
2016-05-11 23:17:11.770 hazelworker[2018] ###Noodle load address: 0x104b49000



I've also tried to do what you said above and removed the folders and added them again and recreated the rules but no dice. It still only works when I run the rules manually.
zinned
 
Posts: 6
Joined: Wed May 11, 2016 4:55 pm

mr noodle...

thank you.... simply renaming and naming back appears to have fixed what ever issue was happening


thank you
chulo
 
Posts: 3
Joined: Tue Apr 01, 2014 7:36 am

same problem here. from 4.x my applescript rules didn't work anymore :(

I already tried to rename and rename back the folder and export/import rules.

my rules consists in rename and then send an email message via mailplane

Code: Select all
tell application "Finder" to set dispName to displayed name of theFile
tell application "Mailplane 3"
   set m to make new outgoing message with properties {directlySend:false, optimizeAttachments:false}
   tell m
      set sender to "info@mail.com"
      set r to make new to recipient at end
      tell r
         set address to "recipient@mail.com"
         set name to "Recipient"
      end tell
      set r to make new bcc recipient at end
      tell r
         set address to "kintaro@mail.com"
         set name to "Kintaro"
      end tell
      set subject to "Kintaro - Sending " & dispName
      set content to "Sending document " & dispName
      make new mail attachment with properties {path:theFile}
   end tell
   compose m
end tell


the only log row I think is related to this:

Code: Select all
2016-05-30 16:49:51.751 hazelworker[68616] DEBUG: Unexpected type for Mail download URL: (null)
Kintaro
 
Posts: 5
Joined: Mon May 30, 2016 10:36 am

Have you tried the script outside of Hazel? Also, turn on debug mode: https://www.noodlesoft.com/kb/hazel-debug-mode/

That should show more logs though if the AppleScript is executing "successfully", there may not be much more info there.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Have you tried the script outside of Hazel? Also, turn on debug mode: https://www.noodlesoft.com/kb/hazel-debug-mode/

That should show more logs though if the AppleScript is executing "successfully", there may not be much more info there.


it works outside hazel with this code (selecting a file from Finder)

Code: Select all
tell application "Finder" to set theFile to selection as string
#tell application "Finder" to set dispName to displayed name of theFile
tell application "Mailplane 3"
   set m to make new outgoing message with properties {directlySend:false, optimizeAttachments:false}
   tell m
      set sender to "mail@mail.com"
      set r to make new to recipient at end
      tell r
         set address to "mail@email.com"
         set name to "recipient"
      end tell
      set r to make new bcc recipient at end
      tell r
         set address to "mail@mail.com"
         set name to "bcc recipient"
      end tell
      set subject to "text - text " & "dispName"
      set content to "text " & "dispName"
      make new mail attachment with properties {path:theFile}
   end tell
   compose m
end tell


I had already activated debug mode and I can't see any related logs... here it is the whole log once i add a file into that folder:

http://pastebin.com/acEhVz76
Kintaro
 
Posts: 5
Joined: Mon May 30, 2016 10:36 am

Can you give me more details like what the name of the rule was? Did it indicate as being run in the logs? What file was it?
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Can you give me more details like what the name of the rule was? Did it indicate as being run in the logs? What file was it?


problem found!

before that rules there's another that rename the file... disabling that "rename rule" the "script rule" works.

the rule before the "script rule" rename the file

rules are:
    Aggiunge "PAGATA" (e pulisci NON PAGATA) <= this add to the file name PAGATA (and clear NON PAGATA if present)
    manda email automaticamente <= this is the script
Kintaro
 
Posts: 5
Joined: Mon May 30, 2016 10:36 am

I found the problem but I'm not able to solve it :(

any help?
Kintaro
 
Posts: 5
Joined: Mon May 30, 2016 10:36 am

If the file is matching a previous rule then you need to either reorder the rules or use the Continue action on the previous rule if you want the file to match both.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:If the file is matching a previous rule then you need to either reorder the rules or use the Continue action on the previous rule if you want the file to match both.


Adding to the first rule (rename file) the "Continue matching rules" make the second rule work twice. :(

Now I solved merging the two rules in one and worked like in 3.x Hazel.
Kintaro
 
Posts: 5
Joined: Mon May 30, 2016 10:36 am


Return to Support