Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;could also just make it a toggle
- ;and when called in a WinHook, it seems to need SetTimer.. couldn't use SetCursor(false) otherwise
- SetCursor(isLoadingApp)
- {
- if (isLoadingApp)
- {
- cursors := Map("Arrow", 0, "Hand", 0, "Help", 0, "IBeam", 0, "NWPen", 0, "SizeAll", 0, "SizeNESW", 0, "SizeNS", 0, "SizeNWSE", 0, "SizeWE", 0)
- for (iteratedValueName in cursors)
- {
- cursors[iteratedValueName] := RegRead("HKEY_CURRENT_USER\Control Panel\Cursors", iteratedValueName)
- RegWrite("%SYSTEMROOT%\Cursors\aero_working.ani", "REG_EXPAND_SZ", "HKEY_CURRENT_USER\Control Panel\Cursors", iteratedValueName)
- }
- DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS := 0x0057, "UInt", 0, "Ptr", 0, "UInt", 0)
- for (iteratedValueName, iteratedCursorFilePath in cursors)
- RegWrite(iteratedCursorFilePath, "REG_SZ", "HKEY_CURRENT_USER\Control Panel\Cursors", iteratedValueName)
- }
- else
- DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS := 0x0057, "UInt", 0, "Ptr", 0, "UInt", 0)
- }
- /*************************************************************
- * To reset cursors in registry use "Default cursors.reg"
- * and then invoke DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS := 0x0057, "UInt", 0, "Ptr", 0, "UInt", 0)
- *************************************************************
- Windows Registry Editor Version 5.00
- [HKEY_CURRENT_USER\Control Panel\Cursors]
- "Arrow"="C:\\WINDOWS\\cursors\\aero_arrow.cur"
- "Hand"="C:\\WINDOWS\\cursors\\aero_link.cur"
- "Help"="C:\\WINDOWS\\cursors\\aero_helpsel.cur"
- "IBeam"=""
- "NWPen"="C:\\WINDOWS\\cursors\\aero_pen.cur"
- "SizeAll"="C:\\WINDOWS\\cursors\\aero_move.cur"
- "SizeNESW"="C:\\WINDOWS\\cursors\\aero_nesw.cur"
- "SizeNS"="C:\\WINDOWS\\cursors\\aero_ns.cur"
- "SizeNWSE"="C:\\WINDOWS\\cursors\\aero_nwse.cur"
- "SizeWE"="C:\\WINDOWS\\cursors\\aero_ew.cur"
- */
- /********** TRASH: loading cursor without animation **********/
- /*cursors := [32512, 32513, 32514, 32515, 32516, 32642, 32643, 32644, 32645, 32646, 32648, 32649, 32650]
- OnExit((*) => (DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS := 0x0057, "UInt", 0, "Ptr", 0, "UInt", 0), 0)) ; Lambda returns last value (non-zero avoids exit)
- for (id in cursors)
- DllCall("SetSystemCursor", "Ptr", DllCall("CopyIcon", "Ptr", DllCall("LoadCursor", "Ptr", 0, "Ptr", IDC_APPSTARTING := 32650)), "UInt", id)*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement