You can create macros in two ways:
To record a macro:
Putting the iTools system into recording mode creates a new macro folder in the macro registry, using a unique name based on `New Macro' (as shown in the macro tree; see The Macro Tree). If the New Macro folder already exists, then the new name is New Macro (1) and so on until the system finds a uniquely numbered name. You can change the macro's name when macro recording finishes.
At the end of recording, IDL saves the completed macro, and the Macro Editor opens. Note that using the Stop Recording menu command is the only way to stop recording without exiting the iTools system. Changing tools or closing the tool does not stop recording, and a recording started in one iTool will continue to other iTools. You can select the Stop Recording command in any active iTool.