hi,
i need ur help please.
I want to create a shortcut / command, to switch/toggle between 2 mouse cursors schemes.
I have 2 cursor schemes "a & b".
Is there a way to change from a to b / b to a with Fastkeys.
Thanx in Advance.
Mouse Cursor Scheme Switching
-
- Posts: 58
- Joined: Feb 2nd, ’20, 08:36
Would this help?
https://www.autohotkey.com/boards/viewt ... =2&t=82431
https://www.autohotkey.com/boards/viewt ... =2&t=82431
-
- Posts: 58
- Joined: Feb 2nd, ’20, 08:36
hi Marko,
thx for the quick reply.
The link provided didn't help, am getting script error.
Is there a way to execute directly in Fastkeys.
thx for the quick reply.
The link provided didn't help, am getting script error.
Is there a way to execute directly in Fastkeys.
You could do the following: copy the functions into Tools/Startup script:
Then create a shortcut (Type: Command) to magnify the cursor:
...and another shortcut to set the cursor scheme back to default:
Code: Select all
SetCursorScheme( Scheme ) { ; By SKAN on D3AO/D3AO @ tiny.cc/setcursorscheme
Local
Cursors := "Arrow,Help,AppStarting,Wait,Crosshair,IBeam,NWPen,No,SizeNS,"
. "SizeWE,SizeNWSE,SizeNESW,SizeAll,UpArrow,Hand,Pin,Person"
SchemePath2 := "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors"
SchemePath1 := "HKCU\Control Panel\Cursors"
SetRegView, 64
If ( Scheme="Windows Default" )
{
RegWrite, REG_SZ, %SchemePath1%,, Windows Default
RegWrite, REG_DWORD, %SchemePath1%, Scheme Source, 2
Loop, Parse, Cursors, CSV
{
RegRead, Val, %SchemePath2%\Default, %A_LoopField%
If (! ErrorLevel )
RegWrite, REG_EXPAND_SZ, %SchemePath1%, %A_LoopField%, %Val%
}
SetRegView, Default
Return DllCall("SystemParametersInfo", "Int",0x57, "Int", 0, "Ptr", 0, "Int", 0)
}
SchemeSource := 2
RegRead, Val, %SchemePath2%\Schemes, %Scheme%
If ( ErrorLevel )
{
SchemeSource := 1
RegRead, Val, %SchemePath1%\Schemes, %Scheme%
}
If ( ErrorLevel )
SchemeSource := 0, Scheme := ""
Cur := StrSplit(Val, ",")
RegWrite, REG_DWORD, %SchemePath1%, Scheme Source, %SchemeSource%
RegWrite, REG_SZ, %SchemePath1%,, %Scheme%
Loop, Parse, Cursors, CSV
{
RegRead, Val, %SchemePath2%\Default, %A_LoopField%
If (! ErrorLevel )
RegWrite, REG_EXPAND_SZ, %SchemePath1%, %A_LoopField%, % Cur[A_Index]
}
SetRegView, Default
Return DllCall("SystemParametersInfo", "Int",0x57, "Int", 0, "Ptr", 0, "Int", 0)
}
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GetCursorSchemes() {
Local Schemes := ""
SetRegView, 64
Loop, Reg
, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes, V
Schemes .= A_LoopRegName . "`n"
Loop, Reg, HKCU\Control Panel\Cursors\Schemes, V
Schemes .= A_LoopRegName . "`n"
SetRegView, Default
Return RTrim(Schemes, "`n")
}
Code: Select all
SetCursorScheme("Magnified")
Code: Select all
SetCursorScheme("Windows Default") ; Windows 8.1 / 10
; SetCursorScheme("") ; Windows 7 / 8.1 / 10
-
- Posts: 58
- Joined: Feb 2nd, ’20, 08:36
hi Tom,
thank you for the support.
one more tip please.
My 2 schemes are
1 - Motion
2 - Valley
where in the script should these be replaced;
as default is mentioned a couple times.
thank you for the support.
one more tip please.
My 2 schemes are
1 - Motion
2 - Valley
where in the script should these be replaced;
as default is mentioned a couple times.