User Tools

Site Tools


manual:Macro_Groups

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
manual:Macro_Groups [2017/08/23 02:47]
peternlewis
manual:Macro_Groups [2019/09/08 21:11]
JMichaelTX
Line 2: Line 2:
  
 Keyboard~~Maestro organizes your macros into Macro~~Groups which are like folders of macros. ​ Each Macro~~Group contains a number of macros and controls when those macros are active. Keyboard~~Maestro organizes your macros into Macro~~Groups which are like folders of macros. ​ Each Macro~~Group contains a number of macros and controls when those macros are active.
 +
 +**Note:** Please see this Wiki article for a more up-to-date discussion of Macro Groups: [[:​Macro_Groups|Macro Groups]].
  
 A Macro~~Group can target or exclude specific applications,​ which means the macros it contains will only be active in those desired applications or when those applications are running. ​ For example, you can have macros which are active only in Mail.app. ​ It can also be active only in specific windows. ​ So for example, you can have macros which are active only in Mail.app, or only in Mail.app when a compose window is open. A Macro~~Group can target or exclude specific applications,​ which means the macros it contains will only be active in those desired applications or when those applications are running. ​ For example, you can have macros which are active only in Mail.app. ​ It can also be active only in specific windows. ​ So for example, you can have macros which are active only in Mail.app, or only in Mail.app when a compose window is open.
Line 17: Line 19:
 Now click the BUTTON{{{+}}} button below the Macro~~Groups list. Now click the BUTTON{{{+}}} button below the Macro~~Groups list.
  
-{{ macrogroupeditor.png?​937x512 ​|Macro Group Editor }}+{{ macrogroupeditor.png?​937 |Macro Group Editor }}
  
 Enter the name of your new Macro~~Group. Enter the name of your new Macro~~Group.
Line 62: Line 64:
 To have Macros that are active and displayed in a macro palette after you trigger the Macro Group, set the Macro Group to “Shows/​hides a palette when”. The Macros in the Macro Group will be displayed in a floating Macro Palette and enabled when you trigger the Macro Group and will remain displayed until you trigger the Macro Group again. You could use this to create a set of related actions that do not even need a Hot Key. For example, you could have a group of macros to align objects in a CAD application,​ so when you press Command-Control-A,​ a palette of these macros is displayed and you can click various alignment options (distribute left-right, align top edges) and then close the palette by pressing Command-Control-A a second time. To have Macros that are active and displayed in a macro palette after you trigger the Macro Group, set the Macro Group to “Shows/​hides a palette when”. The Macros in the Macro Group will be displayed in a floating Macro Palette and enabled when you trigger the Macro Group and will remain displayed until you trigger the Macro Group again. You could use this to create a set of related actions that do not even need a Hot Key. For example, you could have a group of macros to align objects in a CAD application,​ so when you press Command-Control-A,​ a palette of these macros is displayed and you can click various alignment options (distribute left-right, align top edges) and then close the palette by pressing Command-Control-A a second time.
  
-To have Macros that are always ​active and displayed in a palette, set the Macro Group to “Shows a palette until”. The Macros in the Macro Group will be displayed in a floating Macro Palette and enabled. The palette will close when (if) you trigger the Macro Group and will remain closed (and the macros disabled) until you trigger the Macro Group again. You could use this to create a set of related actions that do not even need a Hot Key and that are available in a Macro Palette. You could make the Macro Group available only in a specific application so that it appears only in that application. For example, you could have a group of macros to align objects in a CAD application,​ and have the Macro Group available (and hence the palette displayed) only in the CAD application.+To have Macros that are initially ​active and displayed in a palette, set the Macro Group to “Shows a palette until”. The Macros in the Macro Group will be displayed in a floating Macro Palette and enabled. The palette will close when (if) you trigger the Macro Group and will remain closed (and the macros disabled) until you trigger the Macro Group again. You could use this to create a set of related actions that do not even need a Hot Key and that are available in a Macro Palette. You could make the Macro Group available only in a specific application so that it appears only in that application. For example, you could have a group of macros to align objects in a CAD application,​ and have the Macro Group available (and hence the palette displayed) only in the CAD application.
  
-Even if the macros are displayed in a Palette, the macros can still have Hot~~Key (or any other kind of) triggers which will be available whenever the macro group is active ​(in this case, whenever the palette is displayed).+Whether ​the macros are displayed in a Palette ​or not, the macros can still have Hot~~Key (or any other kind of) triggers which will be available whenever the macro group is active.
  
-You can disable or enable a macro group by selecting it and clicking ​the BUTTON{{{✓}}} button at the bottom of the Groups list.  If a Macro~~Group ​is disabled or inactive for any reason, all its contained Macros will be inactive.  ​You can disable or enable a Macro Group using the Set Macro Enable actionyou can show in a palette or activate a Macro Group using the Show Macro Group or Activate Macro Group actions.+With the previous three settings, ​the macros are active if and only if the palette ​is displayed.  ​The final three options are the same except that the macros are always activeso they are always available to be triggered by another means, and sometimes by the palette.
  
-You can change the targeting of an existing group by selecting it in the Groups list and clicking the BUTTON{{{Edit}}} button, or by double clicking the macro group.+You can change the targeting of an existing group by selecting it in the Groups list and ensuring you are in Edit mode by clicking the BUTTON{{{Edit}}} button, or by double clicking the macro group.
  
-You can disable a Macro Group from AppleScript with:+You can disable ​or enable ​macro group by selecting it and clicking the BUTTON{{{✓}}} button at the bottom of the Groups list.  If a Macro~~Group is disabled or inactive for any reason, all its contained Macros will be inactive. ​ You can disable or enable a Macro Group using the Set Macro Enable action, you can show in a palette or activate a Macro Group using the Show Macro Group or Activate ​Macro Group actions.
  
-<code applescript>​ +Disabled ​Macro Groups can optionally be hidden using the choosing the [[Menus#​Hide_Disabled_Macro_Groups|View ➤ Hide Disabled Macro Groups menu]].
-tell application "​Keyboard Maestro"​ +
-  setMacroEnable "Macro Group Name or UID" with/​without enable +
-end tell +
-</​code>​+
  
-You can start editing ​Macro or Macro Group from AppleScript with:+You can control or right click on macro group to Disable, Enable, Rename, Duplicate, ​or Export it.
  
-<code applescript>​ +The Keyboard Maestro ​editor has full AppleScript support so you can manipulate ​macro groups ​in many ways via AppleScript. ​ See [[:Scripting_the_Keyboard_Maestro_editor#​Macro_Groups|Scripting the Keyboard Maestro ​editor]]
-tell application "Keyboard Maestro+
-  editMacro "Macro Group Name or UID" +
-end tell +
-</​code>​ +
- +
-You can get the list of currently selected macros or macro groups ​with: +
- +
-<code applescript>​ +
-tell application "Keyboard Maestro+
-  selectedMacros +
-end tell +
-</​code>​+
  
 To delete a Macro~~Group,​ select the macro group and then press Command-Delete or click the BUTTON{{{-}}} button at the bottom of the Groups list. To delete a Macro~~Group,​ select the macro group and then press Command-Delete or click the BUTTON{{{-}}} button at the bottom of the Groups list.
  
 You cannot delete or rename or disable the Global~~Macro~~Group. ​ If you want to control when some of the macros within the Global Macro Group are active, make a new macro group and drag those macros to it. You cannot delete or rename or disable the Global~~Macro~~Group. ​ If you want to control when some of the macros within the Global Macro Group are active, make a new macro group and drag those macros to it.
- 
manual/Macro_Groups.txt · Last modified: 2023/09/28 00:30 by peternlewis