Hello. I have this code where it does indeed hide the cursor, but it wont execute the rest of my script afterward after hiding cursor. I wanted to have this in a separate script so I can just toggle it, then turn my other script on. However, when I turn my other script on , it unhides the cursor again. I suppose I could just unplug the mouse from the computer, as that technically hides the cursor, but I'd rather not do that everytime as its bad for the hardware. Heres my code:
Code: Select all
SystemCursor(0) ; This will hide the cursor when the script starts
SystemCursor(OnOff=1) {
if (OnOff == 1)
{
DllCall("ShowCursor", Int,1)
}
else
{
MouseGetPos, , , hwnd
Gui Cursor:+Owner%hwnd%
DllCall("ShowCursor", Int,0)
}
}
Toggle := 0 ; 0 means cursor is shown, 1 means hidden
F1:: ; F1 to pause and resume cursor visibility
Toggle := !Toggle
SystemCursor(Toggle)
Return
looking to incorporate this into my main script where, when I press ESC to pause the script, it also toggles off the cursor hide, then hides it again when i unpause and the script begins running again. Thanks for any advice