Next: Output Facilities
Up: Controlling and Viewing
Previous: The ``Options'' Menus
The Manager uses the ResourceDev (refer 9.3) to define helpful things like keyboard macros. A keybord
macro can be invoked in the GRAPE Control WIndow by simply pressing the
button, the macro is attached to. The general structure of the
ResourceDev files is described in the section 9.3.1. The info block for the Manager in these files has the
name Manager and has to look like that:
Manager = {
tag;
.
.
tag = value;
}
After the different tags have been described a small Manager info block to
understand the stucture is given. Put it to your .graperc file and test
it. A larger demo file can be found in our demo directory.
- help
- void
Print all available tags for the manager, their type
and current settings.
- ask_on_exit;
- char
Open a confirm layer for exiting GRAPE.
This is useful if you fear to exist your GRAPE-program by accident. If
the tag is given without an value confirmation will be asked before exiting
GRAPE. The default value is not to ask before exiting GRAPE.
- hotkey
- subgroup { ... }
Define a hotkey, which is a macro
bound to a keystroke. Hotkeys which are bound to simple characters can not
be used, if any Input field is active. The subgroup, defining the macro has
the following tags:
- help;
- void
Print all available tags which can be used in the
hotkey definition.
- key
- string
This tag must be the first entry in each
hotkey-Group. The format of the string is [modifier-]*key, valid
modifiers are "CASLMR". The meanings of these different modifierers are
control, alternate, shift and the different mouse buttons. e.g. "C-a"
means macro be executed by pressing control "a", "A-S-h" = "A-H" means
macro be executed by pressing alternate and capital "h", "R-f" means the
macro will be executed by pressing "f" while the right mouse button is
pressed.
- autostart
- void
Execute macro automatically at manager
startup. Macros including this tag can by used to configure the start up
status of the manager. e.g. Switch all matrix editors to sphere mode.
- item
- string
Only execute macro if item-path of item, which
is currently at the mouse pointer position, matches the given item path
string.
- click
- string
Simulate a mouse click into the center of the
given Item. Use keystate to select mouse buttons, the default button
is "L". This tag has the same meaning as a pressMouse tag
immediately followd by a releaseMouse tag for the same item.
- pressMouse
- string
Simulate a mouse press event in the center
of the given Item.
- releaseMouse
- string
Simulate a mouse release event in the
center of the given Item.
- typein
- string
Simulate keyboard typein. This tag should be
used to enter value into selected inputs. Pay attention, that an input is
selected at the moment this part of a macro is executed. Otherwise the
keystrokes will recursively call other macros if present and bound to keys
existing in the given string.
- pressXxx
- int
Press one of the following special keys once or
the given number of times. If no value is given the key will be pressed
once. Replace the Xxx by one of the following text {"Return",
"Escape", "Backspace", "Tab", "Delete", "Home", "LeftArrow", "UpArrow",
"RightArrow", "DownArrow", "PageUp", "PageDown", "End", "Begin", "F1",
"F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"}.
e.g. pressReturn finishes the editing of an input field.
- item_send
- string
Send a "-send"-method to the item at
current mouse position. The text "-send" will by append to the method
name. e.g. A keyboard macro including item_send = "print-item-path"
will print out the path of the item at the current mouse position to the
standard output.
- keystate
- string
Set the keystate for the following events in
the current macro. Valid stateflags are "CASLMR", with the meaning
described in key. This is useful to create special inputs like
control "A".
- mousestate
- char
Set the active mouse buttons used for
click, pressMouse and releaseMouse. Valid values are "L",
"M" anr "R". The default value is "L".
- cmd_delay
- int
Set delay after each command in milliseconds.
Thsi tag is very useful for software demonstrations. Using this and the
following delay functions a demonstration can be tested and than shown
without the danger of pressing the wrong button. Default value is 0.
- char_delay
- int
Set delay after each simulated keystroke in
milliseconds. Together with the click_delay and the
mouse_delay tag this feature allows everyone viewing the macro
execution to understand the proceeding. Default value is 0.
- click_delay
- int
Set delay for each simulated mouse click in
milliseconds. If this delay is unequal to zero you see clicked Buttons go
down and after the delay time go up again. The default value is 0.
- mouse_delay
- int
Set simulated mouse moving speed in
milliseconds. Increase this value if you want the mouse to slow down for
the current macro execution. Default value is 0.
- pause
- int
Confirm continuation for each of the given number
of steps. If the tag is given without an value 1 is assumed. Use
this tag for debugging your macros or to stop demonstrations at specific
points to make some explanations.
- no_abort
- int
Ignore errors for the given number of steps.
Using this tag the macro will not be aborted if an error occurred. e.g. a
macro wants to press a button, which may not be available. Instead of
writing two different macros for similar situations put a no_abort =
1 tag in front of the critial order.
Manager = {
# First a macro to get the item pathes. To use it position the mouse over
# aspecific item an press Control + "P". Remember capital "p" !
hotkey = {
key = "C-P";
item_send = "print-item-path";
}
hotkey = {
key = "A-x";
mouse_delay = 20;
click = "/main/top-row/exit";
}
hotkey = {
key = "A-a"
click = "/main/manag/misc/add-project";
typein = "amandus";
pressReturn;
}
}
Next: Output Facilities
Up: Controlling and Viewing
Previous: The ``Options'' Menus
SFB 256 Universität Bonn and IAM Universität Freiburg Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik,
Universität Bonn.