Jump to content

Need to temporarily turn off mouse pointer


Recommended Posts

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?

Link to post
Share on other sites

@ 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
Link to post
Share on other sites

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?

Link to post
Share on other sites

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...