Jump to content

Recommended Posts

Posted (edited)

I write following script:

#include<Constants.au3>
#Include<WinAPI.au3>
While 1
    HotKeySet("{PAUSE}", "MOUSE")
WEnd
Func MOUSE()
    _WinAPI_Mouse_Event($MOUSEEVENTF_MOVE, 100, 0, 0, 0)
EndFunc

This script should moves mouse cursor 100 pixels to right but it doesn't work. Cursor moves 155 pixels to right. 55 pixels too much. :/

I don't know why?

I use Windows 7 64bit. Help me, please.

Edited by Meli90
Posted

Try

#include<Constants.au3>
#Include<WinAPI.au3>
While 1
    HotKeySet("{PAUSE}", "MOUSE")
WEnd
Func MOUSE()
    _WinAPI_Mouse_Event(BitAND($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), 100, 0, 0, 0)
EndFunc

Or try a BitOR

I must mention though, I never had much luck with these functions when I tried them.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted

It still doesn't work.

BitAND case: cursor doesn't move.

BitOR case: cursor moves to left-up corner desktop, not 100 pixels to right side.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...