| View previous topic :: View next topic |
| Author |
Message |
DavidR Contributor

Joined: 05 Aug 2003 Posts: 83 Location: Bethel Pennsylvania U.S.A.
|
Posted: Wed Apr 28, 2004 11:38 am Post subject: Moving Mouse |
|
|
I know how to get the current Mouse Position and how to specify the position if I want to CLICK but is there any way to simulate moving the mouse without doing anything else? For example, if you physically moved your mouse so the cursor was over a specific position on the screen but you didn't press any buttons or keys.
Any way to do this in VDS ? API perhaps?
Thanks,
David |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Apr 28, 2004 12:40 pm Post subject: |
|
|
| Code: | LoadLib user32.dll
%A = @Lib(user32,SetCursorPos,BOOL:,INT:25,INT:25)
FreeLib user32
|
| Quote: | The cursor is a shared resource. A window should move the cursor only when the cursor is in its client area.
The calling process must have WINSTA_WRITEATTRIBUTES access to the window station. |
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Apr 28, 2004 8:09 pm Post subject: |
|
|
| Code: | LOADLIB USER32.DLL
REM The x position of where you want the cursor.
%X =
REM The y position of where you want the cursor.
%Y =
%I = @LIB(user32,SetCursorPos,,INT:%X,INT:%Y)
FREELIB USER32.DLL
REM
REM Return Values:
REM
REM If successful the value is nonzero.
REM If not, the value is zero.
REM |
_________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|