Jump to content

Recommended Posts

Posted

I am writing a script and need to turn off the mouse pointer for the duration of the script then turn it back on when the script exits. I have looked through WinAPI and WinAPIEx and both seem to elude to doing it but I can find nothing specfic. Has anyone done this before?

Posted

@ ZiggyStardust to block the mouse can use the UDF BlockInputEx made ​​by MrCreatoR:

To hide the pointer:

DllCall("user32.dll", "int", "ShowCursor", "int", False); Hide pointer
sleep(1000)
DllCall("user32.dll", "int", "ShowCursor", "int", False); Show pointer
Posted

I found reference to show and hide cursor in WinAPI and WInAPIEX. I was wondering if Cursor and Pointer were the same thing. For some reason this didn't work:

DllCall("user32.dll", "int", "ShowCursor", "int", False); Hide pointer

sleep(1000)

DllCall("user32.dll", "int", "ShowCursor", "int", False); Show pointer

Neither did the ones in the WinAPI UDF. What am I doing wrong?

Posted

Thanks guys. Very, very helpful. Either MouseTrap or the above hide mouse pointer.rar work. The nice thing about MouseTrap is that it will work when BlockInputEx is in effect. MouseClick will not. Thanks a million!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...