ivdccxi / Cursor-Hide

AutoHotKey Script and compiled exe for auto hiding mouse cursor
1 stars 0 forks source link

Help Please #1

Open Tony0110 opened 5 months ago

Tony0110 commented 5 months ago

Please its amazing but How could i change it to hide after 3 seconds of idle ?

alxspiker commented 5 months ago

Hi @Tony0110,

I investigated the Cursor-Hide project, which uses an AutoHotkey script. To change the idle time to hide the cursor after 3 seconds, follow these steps:

  1. Open the CursorHide.ahk file in a text editor.

  2. Locate the following code section:

    SetTimer, CheckIdle, 250
    return
    
    CheckIdle:
    MouseGetPos, cx, cy
    TimeIdle := A_TimeIdlePhysical // 1000
    if (TimeIdle >= 3)
    {
        MouseGetPos, ix, iy
        SystemCursor("Off")
    }
    else if (cx != ix or cy != iy)
    {
        SystemCursor("On")
    }
    return
  3. Change the timeout value from 3 to 3000 to set it to 3 seconds:

    SetTimer, CheckIdle, 250
    return
    
    CheckIdle:
    MouseGetPos, cx, cy
    TimeIdle := A_TimeIdlePhysical // 1000
    if (TimeIdle >= 3000)
    {
        MouseGetPos, ix, iy
        SystemCursor("Off")
    }
    else if (cx != ix or cy != iy)
    {
        SystemCursor("On")
    }
    return
  4. Save the changes and reload the script in AutoHotkey.

Let me know if you need any further assistance!

Best, Alx