Last night I used this trick on an old macro, using the assigned key in parenthesis
This is a great trick. Thanks!
I was checking the wiki page. I can see how using just / or /. is assigned to Enter/Return or Escape. Thanks
Glad to help! It is great being able to assign buttons to keys.
Do you mind sharing the 2 versions so I can see what you mean?
Yes, I can see how having Switch instead of IF THEN looks better and cleaner, especially when it comes to nesting IF THEN actions, which is kinda messy
I think the wiki page explains this
The actions in the first section that matches will be executed. If no section matches, then no actions will be executed and the execution will continue after the Switch/Case action. Under no circumstances will actions from more than one section be executed - that is, execution does not “fall through” to following sections as happens in some languages.
So basically, once there's a match (reading top to bottom), it leaves the Switch action and goes to the next action.
Thank you all for sharing your approaches to Switch vs If Then.
Always learning a few tricks here and there