I am struggling with a Hazel action that shall watch a particular folder for new PDF files and run a defined Automator workflow (service) on them. Hazel finds matches in the folder but doesn't execute the workflow. My guess is that the problem is that the workflow requires a selected file and I don't know how to make Hazel select that file.
Here is what I have.
Hazel action
- Code: Select all
Watch folder "Office"
If all {
Extension IS pdf }
Then do {
Run Automator workflow (PDF to PNG.workflow) }
The workflow is defined as
- Code: Select all
Get Selected Finder Items
Render PDF Pages as Images
Move Finder Items (to "Inbox")
I would expect that each new PDF in the folder "Office" will be converted and the newly converted file moved to "Inbox". It all runs nicely when I start the Automator service manually on PDFs in the "Office" folder.
That's the log output for one test action:
- Code: Select all
2015-08-17 19:00:35.772 hazelworker[5382] ###main load address: 0x10b358000
2015-08-17 19:00:35.773 hazelworker[5382] ###Noodle load address: 0x10b470000
2015-08-17 19:00:35.773 hazelworker[5382] ###CK load address: 0x10b432000
2015-08-17 19:00:36.248 hazelworker[5382] Processing folder Office
2015-08-17 19:00:38.370 hazelworker[5382] test.pdf: Rule Convert and delete uploaded PDF matched.
2015-08-17 19:00:45.927 hazelworker[5382] Done processing folder Office
Can someone please help me out?
Thanks.
Reiner