grandMA3 User Manual Publication
GetUIObjectAtPosition(integer, table)
grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » GetUIObjectAtPosition(integer, table)
|
Version 2.1
|
Description
The GetUIObjectAtPosition Lua function returns the handle of the UI Object at a specified position on a specified display.
Argument
- Integer:
The integer should be the index number of the display with the UI object. - Table:
The table must have two elements with the following keys:- x: This is the X position on the display. The value must be a number indicating the desired pixel position. It is counted from the left side of the display.
- y: This is the Y position on the display. The value must be a number indicating the desired pixel position. It is counted from the top of the display.
- x: This is the X position on the display. The value must be a number indicating the desired pixel position. It is counted from the left side of the display.
Return
- Handle | nil:
If a UI object is at the provided position, then the handle to the object is returned. Otherwise, it returns nil.
Example
This example prints the Dump of the UIObject at a specific position on display 1. It also uses the DrawPointer function to draw a red pointer at the position.
Dump()
The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.
Learn more in the Dump() topic.
The DrawPointer function draws a red pointer at a display. Learn more about it in the DrawPointer() topic.
Lua |
return function() |