Commands & Syntax > Commands > User Interaction >

www.perfectkeyboard.com

 

Menu of MACROS - < macromenu >() ... [Pro]

 

Menu of MACROS
<macromenu>(x,y,"Macro group",Option)
Available in: Professional edition

This command shows a menu consisting from (enabled) macros found in the defined macro group. Clicking on a menu item (macro) will cause that the macro is started.

 

#

Parameter name

Parameter description

1

x

X-coordinate of the menu position. If Xpos is 0 and Ypos is also 0, the menu appears on caret position where text is entered. If Xpos is -1 and Ypos is also -1, the menu appears on mouse cursor position. If Xpos is -2 and Ypos is also -2, the menu appears in the center of the currently active window or in the center of screen.

2

y

Y-coordinate of the menu position. If Xpos is 0 and Ypos is also 0, the menu appears on caret position where text is entered. If Xpos is -1 and Ypos is also -1, the menu appears on mouse cursor position. If Xpos is -2 and Ypos is also -2, the menu appears in the center of the currently active window or in the center of screen.

3

Macro group

Macros (name of the macro) from this group will show in the menu.

4

Option

Can be one of these values:
2 - default behavior.
3 - a prefix (1-9, a-z) is added before each macro name in the menu. This allows user to run macro by pressing the prefix key.

The macro menu is by default sorted alphabetically. If the +4 are added to the options above (so that the options number will be either 6 or 7) then the macro menu is to sorted based on the "Order" column in the macro listing in main window.

 

Example (Macro Steps):

 

1

<#> <#> This macro will open menu with macros from

2

<#> <#> 'New Macro Group' group

3

Macro execution: ONLY COMMANDS

4

Menu of MACROS from group "New Macro Group", [ x = -1, y = -1 ], Option = Sort alphabetically+Add item numbering

Example (Plain Text):

 

<#> This macro will open menu with macros from

<#> 'New Macro Group' group

<cmds>

<macromenu>(-1,-1,"New Macro Group",3)