Macros
In AmtScreens, clients can automate sequential key-press events for use on a form by using macros. This functionality
is provided through the pull down menu "Macros".
The Macros menu option has the suboptions Record macro, Stop
macro, Edit macro, Macro Security and all the macros accessible to the user as shown below.

Record macros:
This option lets users record new macros. After clicking this option, every keystroke made will be recorded into a new macro until the 'Stop macro' option is clicked.
Stop macro:
Clicking this option will stop the recording of keystrokes, and opens the 'Macro Editor' window in which the name, menu name and keyboard shortcut for the macro can be defined. For more information about the 'Macro Editor' window, see its own section below.
Edit macro:
Displays the AMT Macro Editor, in which you can modify your macros.
This option is only visible to users that are assigned to a role with the security component "Macro Editor" enabled. |

To create a new macro, click on the 'New' button (shortcut alt+n).
To edit a macro, select the macro entry and
click on the 'Open' button, double click the entry or press enter.
Both buttons open the 'Macro Editor' window,
in the case of 'New' with empty fields (see Macro Editor below).
To remove a macro, select the macro entry and click the 'Delete' button or press the delete key.
Please note that
deleting a macro will only remove the access to that macro for that user, except when the user deleting the macro is
the only user assigned to the macro, at which point the macro will be actually deleted from the database.
Macros
that are assigned to a role can not be removed.
If a user also has the "Advanced Macro Editor" security component enabled in a role they
are assigned to, a drop-down menu is visible above the Close button.
When 'Basic' is selected in the
drop-down menu, only the macros that the user has access to are displayed.
When 'Advanced' is selected,
macros assigned to other users and/or roles are also displayed.
An additional drop-down menu is visible with which it is possible to limit the displayed macros to only those
assigned to the selected user. Both the macros that are directly assigned to the user and those that are assigned to
a role of which the user is a member of are displayed.
The screenshot above shows all the macros of the user
"TEST", member of the role "Advanced Users".
Macro Editor

In the top panel the key-press events are displayed. Each event is displayed as a macro command block which will be
executed from top to bottom when playing the macro.
The 'Char' command block can be filled with characters when
clicking the block in the top panel.
To add macro command blocks, click on the desired block in lower left panel. The block will then be added below the current selected block.
- Move command up: Moves the selected block(s) up by swapping its place with the block above it.
- Move command down: Moves the selected block(s) down by swapping its place with the block below it.
- Cut: Removes the selected block(s) from the macro and holds the block(s) in the clipboard.
- Copy: Copy the selected block(s) to the clipboard.
- Paste: Adds the block(s) in the clipboard below the current selected block.
- Delete selected command(s): Removes the selected block(s).
- Toggle shift state: Add the shift modifier to the selected block(s).
- Toggle ctrl state: Add the control modifier to the selected block(s).
- Macro Name: Displays the name of the macro.
- Shortkey: After clicking on the editbox a keyboard shortcut can be set by pressing the desired key combination.
- Hotkey Code: Displays the hotkey code of the Shortkey.
- Menu name: The name of the macro that will be displayed in the Macros menu of AMT Screens.
If you modify a macro, an asterisk will appear behind the macro name in the title bar. The macro can then be saved
using the save button (shortcut alt+S) or the changes can be discarded by clicking the close button (shortcut alt+c)
and confirming the action.
When the macro is assigned to more than one user, changing the macro content will
create a new copy of the macro with the same name.
Table of available Macro Command Blocks
Block | Description |
Char | Types the text inserted in the Char block. |
Return | The Return key. |
Xmit | Execute a Transmit command. |
Tab | Insert a Tab. |
Home | Move the cursor to the start of the edit/memo box. |
End | Move the cursor to the end of the edit/memo box. |
Left | Move the cursor one position to the left. |
Right | Move the cursor one position to the right. |
Up | Move the cursor one line up. |
Down | Move the cursor one line down. |
Del | Execute a Delete, i.e. delete the character just after the cursor. |
Back | Execute a Backspace, i.e. delete the character just before the cursor. |
Insert | Toggle the Insert/Overwrite edit mode. |
Copy | Copy selected text to clipboard. |
Paste | Paste text from clipboard. |
Cut | Delete selected text and copy to clipboard. |
SelectAll | Selects all the content of the current focused field. |
EOL | Move the cursor to the end of the current line. |
SOL | Move the cursor to the start of the current line. |
New Line | Execute a New Line command. |
CLL | Clear the current line. |
CLSOL | Clear the current line from the current position of the cursor to the start of the line. |
CLEOL | Clear the current line from the current position of the cursor to the end of the line. |
CLS | Clear Screen, clears the complete contents of the current Form. |
CLSOS | Clear to Start of Screen, clears the contents of all Fields from the current position of the cursor to the start of the current Form. |
CLEOS | Clear to End of Screen, clears the contents of all Fields from the current position of the cursor to the end of the current Form. |
Macro Security:
Opens the 'Macro security' window, in which you can assign macros to users and/or roles in order to grant them access.
This option is only visible to users that are assigned to a role with the security component "Advanced Macro Editor" enabled. |
To assign a macro, select it from the 'Available macros' panel, select the user(s) and/or role(s) and press the
'Save' button.
Assigning a macro to a role will grant access to the macro for every user that is assigned to that role.
Macros must always have at least one
user or role assigned to it.
Assigning a macro to a user that already has a macro with a duplicate name assigned, is initially blocked by a
disabled checkbox for that user (See user "ESCHUTTE" in the screenshot above). This is to avoid accidentally
overwriting the macro of that user. By ticking the 'Overwrite' checkbox, this security measure is turned off.
Allowing the macro to be assigned to the user, thus overwriting the macro with the duplicate name for that user.
Furthermore in case of duplicate named macros, only a single macro can be assigned to a role. Using the
'Overwrite' checkbox to assign a different duplicate named macro to a role will cause the previous role assigned
macro to lose its role assignment.
<User macros>:
At the bottom of the macro menu option all the macros are displayed that have a "Menu name" field defined and are
accessible by the current user. If a macro has a keyboard shortcut set, this is displayed to the right of the macro
name.