Page 1 of 1

Simple rule not working consistently

PostPosted: Fri Mar 21, 2014 9:41 am
by aniseedvan
Hi,

I've just got Hazel on evaluation at the moment installed on my Mac Air, and the initial use would be to check when a text file has been changed in a dropbox folder and extract out the contents to OmniFocus.

I got the rule details and script from here: http://theothersideof.mygeekdaddy.net/2 ... m-windows/

The rule seems to be very hit and miss on actually running, particularly if I edit the file from my windows PC in Notepad. Quite often I've had to go and edit it on the mac to "force it" to run the applescript, which is defeating the purpose..!

The of.txt is in a text_files folder within my dropbox folder on my mac. The folder appears to be watched successfully as I can see this in the log:

2014-03-21 13:22:39.379 hazelworker[673] Processing folder Text_files
2014-03-21 13:22:41.396 hazelworker[673] Done processing folder Text_files

Which is the last time I edited it on the PC. But the rule hasn't fired, as I can see this for the last time I edited it on the mac and saved it:

2014-03-21 12:29:15.968 hazelworker[584] Processing folder Text_files
2014-03-21 12:29:18.077 hazelworker[584] of.txt: Rule OF import matched.
2014-03-21 12:29:18.614 hazelworker[584] Done processing folder Text_files

The conditions are:
name is of
extension contains txt
Date Last Modified is after Date Last Matched


It seems once something happens, I have to edit the file on the mac. It will then empty out into OF, and even possibly for one or two more edits on the PC. Then it just stops working.

I do have AV running on both the windows PC and the Mac. I can't think what else there may be to be getting in the way?

Any help appreciated.

Many thanks.

Re: Simple rule not working consistently

PostPosted: Fri Mar 21, 2014 12:31 pm
by Mr_Noodle
Is it a shared Dropbox folder? After you get the sync from the windows side, check Hazel's preview to see if the file matches the rule at all. Double-check the date modified in this case.

Re: Simple rule not working consistently

PostPosted: Wed Mar 26, 2014 7:29 am
by aniseedvan
Hi

It's not a shared folder.

It's just happened again, the preview doesn't match a rule, and the date modified and the date last matched are the same, i.e. the point when the dropbox folder synced.

Yet first thing this morning, I entered one line, saved it on my my windows PC and it worked fine.

Re: Simple rule not working consistently

PostPosted: Wed Mar 26, 2014 12:15 pm
by Mr_Noodle
I suggest checking the logs. Go to the "Info" section and click "View Log". Search around the time you expected something to happen and see what the messages are there. It might also help to turn on debug mode as described here: viewtopic.php?f=4&t=296

Re: Simple rule not working consistently

PostPosted: Thu Mar 27, 2014 3:45 pm
by aniseedvan
As per above, the logs say the rule isn't firing.

Since I posted that it was working fine, until 12:47 (my last edit, again on the Windows PC):

2014-03-27 12:47:46.374 hazelworker[2355] ###main load address: 0x1079b9000
2014-03-27 12:47:46.377 hazelworker[2355] ###Noodle load address: 0x107a96000
2014-03-27 12:47:46.377 hazelworker[2355] ###CK load address: 0x107a58000
2014-03-27 12:47:46.416 hazelworker[2355] Processing folder Text_files
2014-03-27 12:47:48.491 hazelworker[2355] Done processing folder Text_files

The last modified and last matched date on the file are set to 12:47, i.e. so no match on the file.

Re: Simple rule not working consistently

PostPosted: Fri Mar 28, 2014 2:51 pm
by Mr_Noodle
If the file is not matching, then you should reconsider your rule logic or the workflow. Is the date modified accurate? Is it possible that the date is not set properly when editing the file on windows?