I am trying to make an AutoIt script that can enable and disable font smoothing. I have made this so far:
#RequireAdmin
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\FontSmoothing", "REG_SZ", "0")
But it doesn't seem to be working. Can anyone help me make it work?
You are missing the value name parameter. In this case I believe the FontSmoothing part of the path you've given is actually the value name, so you'd want:
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "FontSmoothing", "REG_SZ", "0")
This sort of error should have been very easy to spot by looking at the RegWrite docs.
It's also worth considering whether this code is being run on a 64 bit computer, and if so use the 64 bit CURRENT_USER hive.