Core Function ControlGetPos
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> ControlGetPos ( <title>, <text>, <controlID> ) </pre> === Description === Retrieves the position and size of a control relative to it's window. === Parameters === ====...")
Newer edit →
(Created page with "<pre> ControlGetPos ( <title>, <text>, <controlID> ) </pre> === Description === Retrieves the position and size of a control relative to it's window. === Parameters === ====...")
Newer edit →
Revision as of 10:40, 27 November 2011
ControlGetPos ( <title>, <text>, <controlID> )
Contents |
Description
Retrieves the position and size of a control relative to it's window.
Parameters
Title
The title of the window to access.
Text
The text of the window to access.
controlID
The control to interact with.
flag
Optional; Changes how "keys" is processed:
- flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow.
- flag = 1, keys are sent raw.
Return Value
Success: Returns an array containing the control's position and size relative to it's window:.
$array[0] = X position $array[1] = Y position $array[2] = Width $array[3] = Height
Failure: Returns 0.
Remarks
None.
Example
$pos = ControlGetPos("Untitled - Notepad", "", "Edit1"); println( "Window Stats: POS: $pos[0] $pos[1] $pos[2] $pos[3]\n" );