guides:programming:programmers_reference_manual:objectbycursor_method_system

OBJECTBYCURSOR Method (System)

This method returns the name of a PS GUI object underneath the cursor.

Hwnd = Exec_Method( "SYSTEM", "OBJECTBYCURSOR", ScreenXY, DPIObject )

NameRequiredDescription
ScreenXYNoScreen coordinates to use for the search. If these are not passed the current cursor position is used.
DPIObjectNoContains the name of a GUI object (control or form) to use for DPI scaling. If this parameter is passed then the ScreenXY is considered to be scaled to the DPIObject’s DPI (i.e. DIPs rather than pixels), and the ScreenXY will be converted to pixels before the search is made.



This parameter is ignored if the ScreenXY parameter is not passed.

The name of the PS GUI object under the cursor (or passed screen coordinates), or null otherwise.

This method is essentially a wrapper around the Windows API ChildWindowFromPoint function – for further information please see the MSDN website.

 
// Example - find the PS object under the screen cursor

   

   hotID = Exec_Method( "SYSTEM", "OBJECTBYCURSOR", "", "", "" )
 
 
 

HANDLEBYCURSOR method.

  • guides/programming/programmers_reference_manual/objectbycursor_method_system.txt
  • Last modified: 2023/10/25 10:50
  • by 127.0.0.1