Input Recording

The input recording records the mouse and keyboard events and creates a new panel with the resulting script.

Figure 1. Input recording Start/Stop in the Tools Menu

The input recording is meant to be used for runtime panels in Vision modules only, and as such should not be used for GEDI actions. In GEDI, the extension script inputRecorder_ext.ctl is used to create the Tools Menu action "Record Mouse/Keyboard Input". It can also be used with the key-combination of "CTRL"+ "Shift" + "R".

Input recording uses mouse and keyboard events, creates CONTROL script commands, and stores these in internal memory until the recording is stopped. When it is stopped via the Tools-menu, a new panel is created, into which the recorded script code is placed. The "play()" function in this panels ScopeLib is used to replay the recorded events. Running this new panel allows to immediately replay the recorded events.

The resulting script should still be checked. The last few events can be removed, since this will be the mouse actions to stop the recording. They are also recorded and can be eliminated.

The playback script uses the Ctrl++ class InputEventPlayer. This class uses the "current shape" to which events will be sent. When no current shape is set (e.g.: with clearCurrent()), the events will be sendt to the currently active popup or window. This allows for more versatile addressing, e.g.: addressing popup menus from right click actions. The InputEventPlayer addresses objects in the panel via the usual CONTROL syntax, and as such is not limited to what one could do in e.g. Squish, since Squish only knows QWidgets generically. In contrast, the WinCC OA UI and also the WinCC OA input recorder knows all objects in the panels ( e.g.: even primitive shapes like lines, rectangles, etc.). This however, also has the limitation that only objects in a panel can be addressed. Therefore GEDI menu actions can not be used via the InputEventPlayer and are also not recorded. If you want to use GEDI actions from a script, use triggerAction() inside the script, and address the "Gedi_1" module as 2nd argument.

Related Functions

Recording Overlay

The currently recorded module is highlighted with a frame around the corner of the module. The appearance of the highlighting can be changed by using the config entries ../cfg_doku/all_config_entries.html#ui__inputRecorderColor and ../cfg_doku/all_config_entries.html#ui__inputRecorderLineType.