I am quite new to Keyboard Maestro but love it. I have the following issue that I tried to solve but couldn't come up with a proper solution in one hour, so I am trying my luck here. I am quite sure it can be solved by keyboard maestro.
Here is the issue:
If have 3 or more different variables which I want to select. Based on the selection of the variables different text will be pasted.
I used the "Prompt for User Input" action, where I can select for each of the variables the right one via an option filed. So far my variables look like this:
Var1_Gender " you | You (formal)"
Var2_Sender " I | we",
Var3_AddNote? "Yes | No".
Now, I want to paste the appropriate text, based on those selections.
The more or less standard text is the following (I marked with the stars the variables):
**Note: We will keep you updated and informed over the further process. **
For further clarifications, You (formal) should not hesitate to contact us.
So far I am using the action "if all conditions met". The problem is, when having 3 variables, and even more that means I – right now – I have 6 different if strings, that I have to type all manually. Is there an easier way? Especially for the future, when I want to have a text with more than 3 variables?
If you're trying to accomplish what I think you're trying to accomplish (namely, a template with variables filling in different fields) the good news is that this is much easier than you're currently making it. All you need to do is include the variables you're selecting in the text you're pasting like so:
Thanks for the reply and help. It is not that easy since the variable are all a bit different. I basically now found a work-around, use the switch action. Thanks for the advice.
What it does now: I define the variables in the beginning. Then I ask with checkboxes for the "input" (easier to select since with the arrows button it does not work as nicely) and have an "IF" Action for the first variabel (Add_Note), with a switch button if it is Var_2 is AB and other wise use Var_2 BB.
It's finally working.
Though the issue will be if I am adding a forth variable, I need to add another IF actions, or is there an easier way?
The complicated part is, that I want with the checkbox gender select the gender, but in the plain text - due to the different declinations in German - the endings of the word can all differ.
I'm glad to hear you got your macro working. However, it's difficult to offer any further advice as to whether there may be an easier way to accomplish whatever it is you would be trying to accomplish by adding a fourth variable without seeing the macro itself and, ideally, the actual results you would be trying to achieve. I suggest reading this post and following its advice if you have any further concrete questions: Tip: How Do I Get The Best Answer in the Shortest Time?