Need help with a Mouse Cursor Hide script
Posted: 05 Nov 2019, 16:27
Hello, I'm new to AutoHotKey. I found this script online, and I would like to see if anyone could help me to edit the script so it could work the way I wanted to.
Here is the script:
[Mod edit: [code][/code] tags fixed]
It works but, I have to click on the script for it to work. It would hide the Cursor for 5 seconds, after 5 secs, it would end and I have to reload the script for it to work again. Can anyone edit this, so that the mouse cursor will hide once the script starts up, and if I were to move the mouse, the cursor would show for about 5 sec. or so. And it would loop until I can turn off the script. It would be nice to be able to watch a movie, browse the web or play a game without having the cursor in plain sight. Thank you for your help.
Here is the script:
Code: Select all
SystemCursor(0)
tooltip cursor is hidden for 5 seconds
sleep 5000
SystemCursor(1)
tooltip
SystemCursor(OnOff=1) {
if (OnOff == 1)
{
BlockInput MouseMoveOff
DllCall("ShowCursor", Int,1)
}
else
{
MouseGetPos, , , hwnd
Gui Cursor:+Owner%hwnd%
BlockInput MouseMove
DllCall("ShowCursor", Int,0)
}
}
It works but, I have to click on the script for it to work. It would hide the Cursor for 5 seconds, after 5 secs, it would end and I have to reload the script for it to work again. Can anyone edit this, so that the mouse cursor will hide once the script starts up, and if I were to move the mouse, the cursor would show for about 5 sec. or so. And it would loop until I can turn off the script. It would be nice to be able to watch a movie, browse the web or play a game without having the cursor in plain sight. Thank you for your help.