Can Keyboard Maestro Handle iTerm2 Triggers?

Hi,

I have a macro1 that does a bunch of stuff and proceeds to run a "make" on the command line.
How can I ask Keyboardmaestro to pick up on the status of the make output (shell variable $? ) and carry out further actions ? I can probably trigger a keyboard command at the end of the make and another macro2 can handle it, but it will be a new macro. I'd like for the macro1 to continue from where it issued the make command. Is this possible ? I take different actions on different make targets, so having a separate macros for separate make targets is cleaner.

Going through iterm2 triggers to see if I can somehow hook it into KM.
https://www.iterm2.com/documentation-triggers.html

Any thoughts ?

Thanks.

Hey Kabali,

iTerm is AppleScriptable.

You might also be able to use a trigger to notice the end of make and notify Keyboard Maestro with an AppleScript.

-Chris

Do something like:

make; echo $? > /tmp/make.status

And then read the file in Keyboard Maestro.