Can GuiXT determine if the "Caps Lock" button is active and/or activate/deactivate it?

There is no GuiXT "Caps Lock" command. What you can do is write your own dll-function and call it in your script. You can use the
GetKeyboadState() and SendInput() functions if you implement it in VC++.