Yep, easy enough. Just use the IF/THEN like Chris @ccstone suggested.
You said "Toggle", so that is exactly what this Macro does.
It is just an example using BBEdit -- you need to adapt to your specific needs.
Put all you your apps to be toggled in BOTH sections of the IF/THEN.
But the Macro Group this is in should probably be a Global group, with no specific apps named.
MACRO: Toggle Activate/Hide Apps [Example]
#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/0/e/0e2897bafd4ac5c24ab1c39e23004f7303cf5a94.kmmacros">Toggle Activate-Hide Apps [Example].kmmacros</a> (3.8 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
![image|536x861](upload://lV0YlZ0WMknG5xijMRKqHafEUo2.png)
Sorry I don't understand at all what you just said. I'm unexperienced when it comes to variables etc and don't know what "DND_TAH_AppStatus" is. I did some basic macros in the past but I simply don.t get it - sorry;)
Perhaps I should just pay someone to do an exact macro for me. Take 2 default mac apps and do exactly as I said in first post please. Then PM me with your paypal ID and price
The macro of @JMichaelTX does the same thing as "if then else" @meeffe. In the gif you see the same behavior.
But I added another Move a Window action to the Hide action. This will return the two apps to their original center view, if you use one of the apps alone in another view.
"DND_TAH_AppStatus" is a KM Variable. See that link for a good overview with examples of how to use.
The name of the KM variable follows my naming convention, which gives me a lot of info in a quick glance:
The "DND" stands for "Do Not Delete", which means that you should NOT delete this variable in the KM Preferences Variables tab, or elsewhere. It is needed by the current macro, and maybe by other macros.
"TAH" stands for "Toggle Activate Hide", which is in the name of the macro. This helps give the KM Variable a unique ID associated with a specific Macro.
"AppStatus" is, of course, just a description name for the Variable, indicating its contents.
The "__" double underscore prior to the "AppStatus" means than if you were to use this in a Prompt for User Input, only the "AppStatus" would show, making it easier to read.
If you have not done so yet, I recommend going through this checklist: