Gesture
3.1.4 Gesture
Gesture - Design and execute a touch screen gesture (since v6.2). It is supported only by mobile device connections such as:
The command supports the following actions:
- "Gesture press" records press of a finger at the specified location to the gesture buffer.
- "Gesture move" records move (drag) of the specified finger to a new location.
- "Gesture release" records the specified finger release.
- "Gesture save" saves the gesture under the given name and clears the gesture buffer.
- "Gesture execute" performs the gesture on the connected device and clears the gesture buffer.
- "Gesture clear" clears the gesture buffer and makes it ready for design of a new gesture. This does not affect saved gestures. As the buffer gets cleared by default by "Gesture execute" and "Gesture save" you normally don't need this command.
A typical gesture scenario:
- Design your gesture using combinations of 'press', 'move' and 'release' actions. Gestures using multiple fingers will always execute them in parallel. For example, a single finger L-shape drag:
Gesture press finger=0 to=x:200,y:200
Gesture move finger=0 to=x:200,y:500
Gesture move finger=0 to=x:350,y:500
Gesture release finger=0 - One time gestures may be executed right away and discarded:
Gesture execute - Should you want to reuse the gesture save it first and then execute it by name at any time:
Gesture save name=L-shape
Gesture execute name=L-shape - Saved gestures may by started from a custom location. The default gesture start point is the 'press' location of the lowest finger ID (typically finger #0 though you may number your fingers in any way within the allowed range). For example, in our example it is [200,200]. To make it start more to the right from [350,200] use:
Gesture execute name=L-shape start=x:350,y:200
Make sure that the moved gesture fits the screen. The command will otherwise trim the gesture to the screen bounds which may change the gesture functionality.
SYNOPSIS
Gesture press finger=<fingerID> to=x:<X-coordinate>,y:<Y-coordinate>
* Red colour indicates obligatory parameters
OPTIONS
finger=<fingerID>
- The finger ID. It is a number starting from 0. The maximum number of supported fingers is subject to the connection and device but it's typically not less than 5.
to=x:<X-coordinate>,y:<Y-coordinate>
- The finger press location.
Gesture move finger=<fingerID> to=x:<X-coordinate>,y:<Y-coordinate>
* Red colour indicates obligatory parameters
OPTIONS
finger=<fingerID>
- The finger ID. It is a number starting from 0. The maximum number of supported fingers is subject to the connection and device but it's typically not less than 5.
to=x:<X-coordinate>,y:<Y-coordinate>
- The location to move (drag) the finger to from the last position.
Gesture release finger=<fingerID>
* Red colour indicates obligatory parameters
OPTIONS
finger=<fingerID>
- The finger ID. It is a number starting from 0. The maximum number of supported fingers is subject to the connection and device but it's typically not less than 5.
Gesture save name=<name> clear=<true|false>
* Red colour indicates obligatory parameters
OPTIONS
name=<name>
- The gesture name. Gesture names are case sensitive. Repeated use of the same name will overwrite the original gesture.
Saved gestures are never cleared by the 'clear' action or parameter. They are available from the moment of their creation until the script terminates. To create a set of standard gestures for your environment create a library (a script) of named gestures and link them to your script using the Include or Run command.
clear=<false|true>
- Indicates whether to clear the gesture buffer and make it ready for design of a new gesture. Clearing discards all 'press', 'move' and 'release' actions recorded so far. It does not affect saved gestures. The default value is 'true' (clear the buffer).
Gesture execute name=<name> start=x:<X-coordinate>,y:<Y-coordinate> duration=<time> clear=<true|false> count=<number> wait=<time>
* Red colour indicates obligatory parameters
OPTIONS
name=<name>
- The gesture to execute. It must be name of an existing gesture that has been created by the script and saved through 'Gesture save'. Gesture names are case sensitive.
If no gesture name is specified the command executes the content of the gesture buffer,
start=x:<X-coordinate>,y:<Y-coordinate>
- Execute the gesture from a custom start point. The default gesture start point is the 'press' location of the lowest finger ID (typically finger #0 though you may number your fingers in any way within the allowed range). This parameter allows you to perform the gesture from another location on the screen.
If the relocated gesture fails to fit the screen the command will trim it to the screen bounds. This may lead to unexpected results.
duration=<time>
- The gesture duration. The value must be either a number of milliseconds or valid time value. The default value is 500 milliseconds (0.5 seconds).
clear=<false|true>
- Indicates whether to clear the gesture buffer and make it ready for design of a new gesture. Clearing discards all 'press', 'move' and 'release' actions recorded so far. It does not affect saved gestures. The default value is 'true' (clear the buffer).
count=<number>
- How many times to perform the gesture. The default value is 1 (perform once).
wait=<time>
- Time to wait after the gesture gets executed. It has the same effect as if the following command was 'Wait <time>
'. The value must be either a number of milliseconds or valid time value. The default value is 0 (don't wait). Scripts may set the default value through populating of the _GESTURE_WAIT variable with the desired delay, for example "Var _GESTURE_WAIT=1s"
.
Gesture clear
* Red colour indicates obligatory parameters
OPTIONS
None.
EXAMPLES
Gesture press finger=0 to=x:125,y:202
Gesture release finger=0
Gesture save name=press
Gesture execute name=press duration=1s
- Perform a 1 second long press at the specified location.
Gesture press finger=0 to=x:300,y:200
Gesture press finger=1 to=x:100,y:500
Gesture move finger=1 to=x:500,y:500
Gesture release finger=1
Gesture release finger=0
Gesture save name=rotate
Gesture execute name=rotate
- Press and hold one finger while dragging another one in the horizontal direction below it. This will for example rotate the Google Maps.