Get windows at x,y ; simulate mouse
Get windows at x,y ; simulate mouse
HI ALL
I need the handle of a window a a specific point f.e. at 30,40 or somewhere else on the screen ,but i do not find a API call for this.
Does someone know a funktion ? ( WINDOWS )
I want to simulate the following think:
Go with the mouse to one point ; press mousekey one ; go to another point ; free the mousekey.
Any idea would be appreciated.
Best regards Willi
I need the handle of a window a a specific point f.e. at 30,40 or somewhere else on the screen ,but i do not find a API call for this.
Does someone know a funktion ? ( WINDOWS )
I want to simulate the following think:
Go with the mouse to one point ; press mousekey one ; go to another point ; free the mousekey.
Any idea would be appreciated.
Best regards Willi
Re: Get windows at x,y ; simulate mouse
> Go with the mouse to one point ;
> press mousekey one ;
> go to another point ;
> free the mousekey.
> press mousekey one ;
> go to another point ;
> free the mousekey.
Code: Select all
SetCursorPos_(pos1_x,pos1_y)
mouse_event_(#MOUSEEVENTF_LEFTDOWN,0,0,0,0)
SetCursorPos_(pos2_x,pos2_y)
mouse_event_(#MOUSEEVENTF_LEFTUP,0,0,0,0)
-
- Enthusiast
- Posts: 613
- Joined: Tue May 06, 2003 2:50 pm
- Location: Germany
- Contact:
not sure but aren't there windowfrompoint_() and similar command in the winapi?... checking... fromw win32.hlp:
"the WindowFromPoint function retrieves the handle of the window that contains the specified point"
"the WindowFromPoint function retrieves the handle of the window that contains the specified point"
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
oh freedimension, you were quicker 

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
- Enthusiast
- Posts: 613
- Joined: Tue May 06, 2003 2:50 pm
- Location: Germany
- Contact:
oh *him*


( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Hi again
My api dokumentation tells me to give the WindowFromPoint_ funktion an strukture of a point but when i try to do this in Purebasic he tells me incorrect number of parameters.
I gave him 2 variable x and y and it runs , is my API dok corrupt ?
My api dokumentation tells me to give the WindowFromPoint_ funktion an strukture of a point
Code: Select all
The WindowFromPoint function retrieves the handle of the window that contains the specified point.
HWND WindowFromPoint(
POINT Point // structure with point
);
I gave him 2 variable x and y and it runs , is my API dok corrupt ?

-
- Enthusiast
- Posts: 537
- Joined: Wed Oct 29, 2003 10:35 am
Not corrupt........ read you post again..... // structure with point.....willib wrote:Hi again
My api dokumentation tells me to give the WindowFromPoint_ funktion an strukture of a pointbut when i try to do this in Purebasic he tells me incorrect number of parameters.Code: Select all
The WindowFromPoint function retrieves the handle of the window that contains the specified point. HWND WindowFromPoint( POINT Point // structure with point );
I gave him 2 variable x and y and it runs , is my API dok corrupt ?
It's a structure..... and this is it....
typedef struct tagPOINT {
LONG x;
LONG y;
} POINT, *PPOINT;

Paid up PB User !