ZiggyStardust Posted July 1, 2012 Posted July 1, 2012 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?
Akarillon Posted July 2, 2012 Posted July 2, 2012 Why does the mouse pointer have to vanish? Just lock it in place at the bottom or something with _MouseTrap. Challenge accepted!
Belini Posted July 2, 2012 Posted July 2, 2012 @ 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 My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
ZiggyStardust Posted July 3, 2012 Author Posted July 3, 2012 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?
Belini Posted July 3, 2012 Posted July 3, 2012 (edited) Works for me, try this other: hide pointer mouse.rar Edited July 3, 2012 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
ZiggyStardust Posted July 4, 2012 Author Posted July 4, 2012 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now