Page 1 of 1

Passing Variables to Keyboard Maestro

PostPosted: Wed Jan 17, 2018 7:42 pm
by Johnamag
I saw in this post, https://www.noodlesoft.com/forums/viewtopic.php?f=4&t=7052&hilit=applescript+maestro, how to initiate/run a Keyboard Maestro macro by using an AppleScript action in Hazel.

But I would like to do that AND pass the file path of the matched file to Keyboard Maestro for processing using Keyboard Maestro.

Is there a way to send the matched file path to Keyboard Maestro, using an AppleScript or some other method?

Re: Passing Variables to Keyboard Maestro

PostPosted: Thu Jan 18, 2018 11:31 am
by Mr_Noodle
Check the help for "AppleScript". There it shows that all AppleScripts have an alias to the file being processed sent in. You can even specify other attributes to be sent in as well.

Re: Passing Variables to Keyboard Maestro

PostPosted: Thu Jan 18, 2018 6:36 pm
by Johnamag
Are you saying that the file path is inherently (i.e. built in to AppleScript) available to AppleScript as soon as that file "hits" the AppleScript action in Hazel?

The route of the file path would be:
Hazel → Applescript → Keyboard Maestro.

Re: Passing Variables to Keyboard Maestro

PostPosted: Fri Jan 19, 2018 10:41 am
by Mr_Noodle
Whoops, I misunderstood it as passing it into Hazel. For Keyboard Maestro, that depends on how it processes things and you should consult them on how to pass stuff in.

Re: Passing Variables to Keyboard Maestro

PostPosted: Fri Aug 27, 2021 1:52 pm
by mlevison
Mr_Noodle wrote:Whoops, I misunderstood it as passing it into Hazel. For Keyboard Maestro, that depends on how it processes things and you should consult them on how to pass stuff in.


Has anyone found an elegant resolution on this?

Re: Passing Variables to Keyboard Maestro

PostPosted: Mon Aug 30, 2021 10:25 am
by Mr_Noodle
Have you tried contacting the support for Keyboard Maestro?