manual:Macros
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| manual:Macros [2019/06/14 04:35] – [Import Macros Safely] peternlewis | manual:Macros [2023/09/28 06:11] (current) – peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Macros ====== | ====== Macros ====== | ||
| - | _**Macros**_ are used to automate your workflow, procedure, or process on your Mac. Macros, also known as Shortcuts, | + | _**Macros**_ are used to automate your workflow, procedure, or process on your Mac. Macros are a way of improving your productivity by allowing you to perform repetitive or frequently required actions more quickly and accurately, tailoring your Mac to your usage patterns. |
| + | |||
| + | Macros are sometimes known as Workflows or Shortcuts, but for Keyboard Maestro we will stick to the terminology of using “Macro” to refer to a Keyboard Maestro macro, and use Shortcuts and Workflows only to refer to Apple’s Shortcuts and Automator Workflows. | ||
| A _**Macro**_ consists of: | A _**Macro**_ consists of: | ||
| Line 11: | Line 13: | ||
| A simple example of a Macro is one which has: | A simple example of a Macro is one which has: | ||
| * A Single [[trigger: | * A Single [[trigger: | ||
| - | * A single action like [[action: | + | * A single action like [[action: |
| * Is in the " | * Is in the " | ||
| Line 19: | Line 21: | ||
| ===== How To Create a Macro ===== | ===== How To Create a Macro ===== | ||
| - | To create a Macro, first launch Keyboard~~Maestro, | + | To create a Macro, first launch Keyboard~~Maestro, |
| - | {{ macroeditor.png? | + | Alternatively, |
| - | Enter the name of your new Macro (you can skip this and it will be named for you based on the action you select). | + | {{ new-macro-wizard.png? |
| - | You can create a new trigger by clicking | + | Enter the name of your new Macro (you can skip this and it will be named for you based on the action you select), the macro group to place the macro in, and optionally select one of the basic triggers |
| - | You can add a new action by clicking the BUTTON{{{New Action}}} button or the BUTTON{{{+}}} button at the bottom of the macro detail view to display the list of actions or by choosing [[Menus#Edit_Insert_Action_by_Name|Insert Action By Name]] from the [[Menus# | + | When you create the macro, the [[Windows# |
| + | |||
| + | {{ macroeditor.png? | ||
| + | |||
| + | You can create a new trigger by clicking on the green BUTTON{{{+}}} button. | ||
| + | |||
| + | You can add a new action by clicking the BUTTON{{{New Action}}} button or the BUTTON{{{+}}} button at the bottom of the macro detail view to display the list of actions or by choosing | ||
| + | |||
| + | You can control or right click on a macro group to Disable, Enable, Rename, Duplicate, or Export it. | ||
| An easy way to generate macro actions is to turn on recording by clicking the BUTTON{{{Record}}} button at the bottom of the macro detail view and proceeding to show Keyboard~~Maestro what you want to do. Then turn recording back off and look through the actions. | An easy way to generate macro actions is to turn on recording by clicking the BUTTON{{{Record}}} button at the bottom of the macro detail view and proceeding to show Keyboard~~Maestro what you want to do. Then turn recording back off and look through the actions. | ||
| Line 58: | Line 68: | ||
| You edit a macro by selecting it and ensure you are in Edit mode. Double clicking on the macro will turn on Edit mode. | You edit a macro by selecting it and ensure you are in Edit mode. Double clicking on the macro will turn on Edit mode. | ||
| - | You can select a macro by name by choosing [[Menus# | + | You can select a macro by name by choosing |
| ===== How to Run a Macro ===== | ===== How to Run a Macro ===== | ||
| Line 79: | Line 89: | ||
| You can trigger a macro using the kmtrigger: scheme with a URL like `kmtrigger:// | You can trigger a macro using the kmtrigger: scheme with a URL like `kmtrigger:// | ||
| - | If the web server is enabled for remote access, you can trigger a macro remotely after logging in using a web browser | + | You can also trigger a macro from a shell script using the [[trigger: |
| + | |||
| + | If the web server is enabled for remote access, you can trigger a macro remotely after logging in using a web browser. | ||
| You can also trigger a macro using AppleScript or another scripting language (select the “Or by script” entry to display script code in various languages such as AppleScript or Perl). | You can also trigger a macro using AppleScript or another scripting language (select the “Or by script” entry to display script code in various languages such as AppleScript or Perl). | ||
| Note that the web server needs to be separately enabled in the [[Windows# | Note that the web server needs to be separately enabled in the [[Windows# | ||
| + | |||
| + | ===== Where are the Macros Stored ===== | ||
| + | |||
| + | The macros are stored in on your local Mac in the Applications Support folder. So it is important to ensure you have good backups to ensure your macros are safe in the event of a harddisk problem or other loss of data on your Mac. | ||
| ===== How to Import Macros ===== | ===== How to Import Macros ===== | ||
| Line 91: | Line 107: | ||
| You may use any of the following to import the macro file (`.kmmacros`): | You may use any of the following to import the macro file (`.kmmacros`): | ||
| * Double-click on the macro file in the Mac Finder. | * Double-click on the macro file in the Mac Finder. | ||
| - | * In the Keyboard Maestro app, goto _File > Import Macros..._ and select the macro file. | + | * In the Keyboard Maestro app, goto _File > Import Macros |
| * In some browsers, click on the downloaded file icon at the bottom of the browser window. | * In some browsers, click on the downloaded file icon at the bottom of the browser window. | ||
| - | :!: Note that the macro file (`.kmmacros`) may contain one or more macros, and will also create the Macro Group if it does _not_ exist in your configuration. | + | Note that the macro file (`.kmmacros`) may contain one or more macros, and will also create the Macro Group if it does _not_ exist in your configuration. |
| ==== Import Macros Safely ==== | ==== Import Macros Safely ==== | ||
| - | (!) You should be aware that the macros will be imported in the same state, triggers, and macro group that they were saved in. By default, macros are imported disabled unless you hold the Option key down. Importing them disabled is important, because otherwise **this could result in the imported Macro being triggered (executed) as soon as it is imported.** | + | (!) You should be aware that the macros will be imported in the same state, triggers, and macro group that they were saved in. By default, macros are imported disabled unless you hold the Option key down. Importing them disabled is important, because otherwise **this could result in the imported Macro being triggered (executed) as soon as it is imported.** |
| See also the [[Macro Groups]], [[Macro Actions]], [[Macro Triggers]], [[: | See also the [[Macro Groups]], [[Macro Actions]], [[Macro Triggers]], [[: | ||
manual/Macros.1560486905.txt.gz · Last modified: by peternlewis
