Page 1 of 1

Hazelworker is not allowed administrative access

PostPosted: Sun Sep 27, 2015 2:24 am
by carlh
Hi all,

Have had a simple hazel folder action running smoothly for months on Mountain Lion. Essentially the folder action opens a script that syncs the given folder with my Google Drive, using the application "SyncTwoFolders", with the script navigating through the applications windows. The whole process takes place in the background.

Issue is, since I have recently updated to Yosemite, I am having issues with this Hazel process. Error log below:

OSAScriptErrorAppNameKey = "System Events";
OSAScriptErrorBriefMessageKey = "hazelworker is not allowed assistive access.";
OSAScriptErrorMessageKey = "System Events got an error: hazelworker is not allowed assistive access.";
OSAScriptErrorNumberKey = "-25211";
OSAScriptErrorRangeKey = "NSRange: {0, 0}";

Any ideas? I'm guessing it has something to do with the allowing assistive access, but I have allowed access for hazelhelper and system events (and every other app)... Is "hazelworker" something that I need to add? If so I don't know how. Cheers

Re: Hazelworker is not allowed administrative access

PostPosted: Mon Sep 28, 2015 12:03 pm
by Mr_Noodle
Seems like it though not being familiar with the script in question, I can't say for sure. You can try wrapping the whole thing in a "tell application "System Events"...end tell" block to have System Events do the whole thing, hopefully working around the issue. If not, you can open the Hazel.prefPane package and look for hazelworker in there to add it to the list.

Re: Hazelworker is not allowed administrative access

PostPosted: Tue Sep 29, 2015 3:55 am
by carlh
For your info, here is the script (it's really basic!!). I have the application System Events running the whole script.

Code: Select all
run application "SyncTwoFolders"


delay 0.1

tell application "System Events"
   
   repeat until window "SyncTwoFolders" of application process "SyncTwoFolders" exists
      delay 0.1
   end repeat
   tell process "SyncTwoFolders"
      click button "Synchronize" of window "SyncTwoFolders"
      
      
      repeat until window "Log" exists
         delay 0.1
      end repeat
      
      click button "Close" of window "Log"
      
      click button 1 of window 1
      
   end tell
end tell


Out of interest, how can you add hazelworker to the list? I can see it in the contents of Hazel.prefpane It seems as it is not an app I am unable to drag it in there...

Re: Hazelworker is not allowed administrative access

PostPosted: Tue Sep 29, 2015 11:38 am
by Mr_Noodle
Try putting the whole thing including the first two lines within the "tell" and see if that fixes anything.

As for adding hazelworker, it's not an app but a standalone binary. Maybe the privacy preferences pane doesn't allow that in this case.