I’ve had a queue-type setup using Hazel and Keyboard Maestro that I set up a couple of years ago — almost exactly like the various situations described below:
As of the day I upgraded to Keyboard Maestro 8.0 (and subsequently 8.0.1), however, the %TriggerValue% (a file) is consistently empty. The Hazel command is simply:
do script "8BCEBEBC-7D7E-4557-AE49-42D06ED3A5A5" with parameter theFile
I’m at my wits’ end trying to figure this one out. Any thoughts?
The parameter must be a string. For a file parameter, you’ll want the posix path of the file.
Try just using the quoted string and verify that gets passed to the macro, and then work backwards from there, figuing out how to get an appropriate string to pass to the parameter field.
Hazel calls the Keyboard Maestro script via AppleScript; the AppleScript is what I posted. Here’s the screen shot from Hazel which should show it clearly.
As you can see, Hazel instructs me to use simply theFile as the parameter to send to KM, and that worked perfectly till the KM8 upgrade.
I have two KM scripts involved: the second (really complicated one) that does all the actual work, and the first, a controller script that handles semaphores and pausing and looping.
I pick up %TriggerValue% again. Obviously, in KM7 this wasn’t a problem — but KM8 clearly cleans out the %TriggerValue% either after I access it in T61 or when I then execute T60. This is good — but exposed my bad code.
Removing the spurious Set variable reference to %TriggerValue% solved the problem.
Thanks for your query, which got me off my duff on this one!
n.p. Always glad to be of a help.
I have probably solved more issues just by asking some questions. When a person answers a question about an issue, they generally can’t skip over some of the details, some of their assumptions. And in doing so they solve their own issues.
Execute Macro passes in (at least potentially) a trigger value of its own, so probable a subtle change in how it works is that the trigger value is no longer implicitly passed down.