Command system.gettouchscreen

The command system.gettouchscreen is used to capture the coordinates (x, y) where the display is pressed. The file config.dat must be changed in order to enable the use of the touchscreen in the application.

Parameters

  1. axisx [integer]
    X-axis coordinate of the display, where the display was pressed.
  2. axisy [integer]
    Y-axis coordinate of the display, where the display was pressed.
  3. variablereturn [integer]
    Variable that will store the return code, where:
    1: display was pressed
    0: display was not pressed

Example

In the example above, the command system.gettouchscreen will return in iXaxis the X coordinate and in iYaxis the Y coordinate of the point pressed on the display.

The while loop is to ensure that the display will continue to listen for a display press.