Trigger keystroke from any app in the same folder?

Hey all,

I’m totally new at using KM, so I wonder if any of you gurus may be able to help me.

When I play a game I want the Dock to auto hide and un-hide when the game quits.

So far I have 2 identical macros that trigger the keystroke I have enabled to achieve this, one macro when the game launches, and another when the game quits.

http://cl.ly/aGv9/Keyboard%20Maestro%20Editor.png
http://cl.ly/aGDJ/Keyboard%20Maestro%20Editor.png

Everything works fine, however when I add a new game I have to add it to both macros, so I was trying to work out a way of the macro triggering if any file is launched and a particular folder (including sub-folders) (all games are stored in the same folder) so I don’t have to add each new title.

To make it even better, could I combine both macros into one, or am I getting ahead of myself?

Any help would be most appreciated.

Paul.

Firstly, why have two macros at all? Why not one macro with triggers for both Launches and Quits. Since they both just do Command-Option-D.

Down the track it might be better as you’ve done it in case you want to do some other action when they are launching or quitting.

You can trigger on any application launches or any application quits, but it will only give you the name of the application, not the path, so it really would not help much in this case.

So basically, you’ve probably got the best solution as it is.

Hey thanks for that Peter, as I think this’ll be the only action I’ll need I think your idea of merging them into just the one macro makes the most sense.

Cheers,

Paul.