0

Is it possible to adjust windows control panel settings from the command line? The settings I'm specifically interested in are the cursor width and blink rate, which can be customized in the Ease of Access Center [1]. I think this is a registry thing, right?

Same as Control Panel Settings from Command Line but I don't think a C# solution will work for me, because what I'm actually trying to do is toggle these cursor settings from AutoHotKey.

[1] https://bltt.org/adjusting-the-windows-text-cursors-blink-rate-and-width/

Empiromancer
  • 3,778
  • 1
  • 22
  • 53

1 Answers1

1

You can set the blink rate with the SetCaretBlinkTime function and the AHK code might look something like this:

DllCall("User32\SetCaretBlinkTime","Uint",666)

I'm not sure if you can change the width:

The width of the caret, in logical units. If this parameter is zero, the width is set to the system-defined window border width.

You can retrieve the width or height of the system's window border by using the GetSystemMetrics function, specifying the SM_CXBORDER and SM_CYBORDER values. Using the window border width or height guarantees that the caret will be visible on a high-resolution screen.

but on the other hand SystemParametersInfo has SPI_SETCARETWIDTH but it is only documented to work on edit controls.

Community
  • 1
  • 1
Anders
  • 97,548
  • 12
  • 110
  • 164