// This macro demonstrates how you can run or debug // the first macro in a macro set with global variables // by pressing ctrl-r (Macros>Run Macro) or ctrl-d // (Debug>Debug Macro) in the macro editor. On the // Mac, you can debug any macro in a macro set by // running it from the Macros menu with the alt key down. // On Linux and Windows, you can debug any macro // in a macro set by adding "debug" to the beginning // of the macro. var a = 10; requires ("1.42h"); macro "Macro 1" { f(); print("a="+a); print("The first macro in a macro set can be debugged"); print("by pressing ctrl-d (Debug>Debug Macro)."); } macro "Macro 2" { print("The other macros in a macro set are skipped"); print("when you run the first macro by pressing ctrl-r."); } macro "Macro 3" { debug; print("One way to debug any macro in a macro set"); print("is to add a debug (breakpoint) statement at"); print("the beginning of the macro."); } function f() { a = 20; }