

You could do this with grep and regular expression, replacing “color (.*)” with “const int k\1 = "\1" ”, which is fine if you can remember how to do grep with regular expressions, whether it is \1 or $1, and whether the application you are in supports regular expressions or not. For example, if you had a list of colors, and wanted to change them in to a list of constants, say from this:

One common use for this is if you want to adjust a sequence of lines in a systematic way. Then each time you press Option-F1, Keyboard Maestro will type “hello” for you. For example, if the Record Quick Macro is triggered by pressing Control-F1, and the specified Hot Key is Option-F1, then if you typed: The sequence can now be executed via the specified Hot Key or the Status Menu or Macro Palette. When you have demonstrated the sequence of actions you want, trigger the Record Quick Macro action again. When triggered, the Record Quick Macro immediately starts recording your actions into a private macro. The other way to use recording is via a Record Quick Macro action. Generally, use recording to create a base sequence of actions and then adjust as necessary. Typically you will need to make a few adjustments to the Macro Actions to ensure the macro will operate robustly when used. When you are finished, click the Record button again to stop recording, or you can stop all recording by clicking on the Recording window. While you are recording, you can pause the recording by clicking the Pause button in the recording window, and you can add a 0.25 second pause to your macro by clicking the Clock button. While Keyboard Maestro is recording, it will display the Recording window. Once recording starts, demonstrate the task you would like to perform using any of the above actions and Keyboard Maestro will record your actions directly into your macro. To avoid the pause, hold the option key down while clicking the Record button). After a short pause for you to get ready, recording will begin. When you are creating or editing a macro, with the Macro Editor window displayed, simply click the Record button. There are two ways you can use recording: when creating or editing a macro, or via a Record Quick Macro action. Keyboard Maestro can record the following actions: Keyboard Maestro has the ability to create macro action sequences by recording your actions.įor example, to create a macro that simulates keystrokes, rather than create each macro action individually you can enable recording and then simply type the keystrokes.
