Passing Variables to Keyboard Maestro

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

Moderator: Mr_Noodle

Passing Variables to Keyboard Maestro 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?
Johnamag
 
Posts: 2
Joined: Wed Jan 17, 2018 7:25 pm

Re: Passing Variables to Keyboard Maestro 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.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Passing Variables to Keyboard Maestro 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.
Johnamag
 
Posts: 2
Joined: Wed Jan 17, 2018 7:25 pm

Re: Passing Variables to Keyboard Maestro 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.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Passing Variables to Keyboard Maestro 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?
mlevison
 
Posts: 15
Joined: Thu May 30, 2013 11:49 pm

Re: Passing Variables to Keyboard Maestro Mon Aug 30, 2021 10:25 am • by Mr_Noodle
Have you tried contacting the support for Keyboard Maestro?
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron