Before writing complex macros, open the PowerMill command line (usually at the bottom of the screen). Every time you click a button, the command appears here. This is the fastest way to learn macro language.
repeat operations while a condition remains true:
Variables store temporary data. They always start with a $ .