Conditional macros allow you to build in a branching decision structure that can respond to a variety of situations, rather than running straight through every action listed in the macro from top to bottom. These follow the common if, then, else structure that’s common to every programming language. In this video, Adam creates a conditional macro that evaluates the current day of the week.
- [Instructor] Conditional macros allow you…to build any branching decision structure…that can respond to a variety of situations…rather than running straight through every action…listed in the macro from top to bottom.…These follow the common if-then-else structure…that's common to every programming language.…Let's take a look at how this works…with a macro that'll tell us…what day of the week it is.…We'll start by going to the create tab…and creating that new macro.…Then in the action catalog,…I'll double click on the if statement…to add in an if block here to my macro.…The first thing I need to do is fill in the condition.…
This expression will need to evaluate…to either a true statement or a false statement.…For this example, I want to test to see…what day of the week it is.…And for that, I'll use the weekday function.…The weekday function will evaluate a date…and return an integer between one and seven.…One represents Sunday, two represents Monday, and so on.…In order to see what today is,…we can use the date function inside of it.…
- Creating multi-step macros
- Triggering macros
- Running macros at startup
- Adjusting the execution and flow of macros
- Troubleshooting macros