Crash in 3.0.12 When Setting Spotlight Comment

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

Moderator: Mr_Noodle

Crash in 3.0.12 When Setting Spotlight Comment Sun Sep 02, 2012 12:29 pm • by Dembo
Hi all,

3.0.12 crashes on me when I try to trigger an Automator Workflow that sets the Spotlight Comment according to the user input (i.e. checked the option "Show this action when the workflow runs" in Automator).

When running this workflow from a Hazel trigger I get the pop-up asking me for user input but pressing any key crashes the workflow. Note that Hazel is not crashing but some Automator sub-process. After the crash Hazel rules that don't rely on Automator work fine, rules that are relying on Automator trigger but get stuck on the Automator part of the workflow. I have to kill to Automator related processes in Activity Monitor to get things moving again.

The workflow was working fine prior to 3.0.12.

The reason for this workflow is that I want to rename a file according to a user input. I used set the Spotlight Comment accordingly and then let Hazel rename the file according to the Spotlight Comment. This is now broken.

If anybody has an idea how to fix this and/or workaround the bug I'd be very happy to hear it.
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

Additional observation: The same crash occurs if I try to trigger the "Rename Single Item" Automator Workflow - this seems to be a more general Automator-related issue with 3.0.12
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

Resolved it by replacing the Automator Workflow with an AppleScript I found on here that allows me to enter a new file name and use it within Hazel's standard rename action.
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

If you are still interested in fixing it with Automator, you should check the logs and post the Automator error here. Nothing has changed in Hazel w.r.t. Automator for some time now. Also, you may want to specify what OS version you are running.
Mr_Noodle
Site Admin
 
Posts: 11285
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:If you are still interested in fixing it with Automator, you should check the logs and post the Automator error here. Nothing has changed in Hazel w.r.t. Automator for some time now. Also, you may want to specify what OS version you are running.


Thanks for the reply Mr. Noodle. I never looked backed after adapting the AppleScript [1]. Very powerful solution and it introduced me to ExportTokens.

Now, if I only could make real sense of AppleScript... Although I have plenty of experience working with Python, C, C++, Pearl and even VBA, AppleScripts syntax just drives me crazy.



[1] viewtopic.php?f=4&t=1445
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

It definitely takes getting used to. I consider it a language that's easy to read but hard to write (which is a bit like the opposite of Perl). In any case, search around the net as there are quite a few resources out there.
Mr_Noodle
Site Admin
 
Posts: 11285
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Dembo wrote:Resolved it by replacing the Automator Workflow with an AppleScript I found on here that allows me to enter a new file name and use it within Hazel's standard rename action.


I have a feeling that you're using this script? If so, since I wrote it I'll be happy to help you make some changes.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

a_freyer wrote:I have a feeling that you're using this script? If so, since I wrote it I'll be happy to help you make some changes.


Absolutely! It's brilliant, thank you very much for showing us/me how to do these things. I am happy with what I figured out just by looking at your code and things are working very reliable for now. I just have the gut feeling that by truly understanding AppleScript so much more could be accomplished using the Hazel framework... ;)
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm


Return to Support