Is there a way to switch on & off the numlock/scrolllock/capslock lights on the keyboard?
My situation is the following: I want my numlock light to shutdown when my computer goes to shutdown or standby mode and lit back up when the system restores or boot. I especially need it for the standby/restore modes.
I know there's events I can use in EG I could use for this but I don't see any action that allows to switch lights. I can't event simulate the NumLock KeyPress.
Anyone has an idea?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Is it possible to...
Re: Is it possible to...
Maybe this will work.
http://www.rjlsoftware.com/software/utility/numlock/
http://www.rjlsoftware.com/software/utility/numlock/
Re: Is it possible to...
Something like this? It checks the state of the three buttons and toggles them. (copy&paste into EG)
You should trigger the "Off" macro when you turn off your machine, and the "Back on" macro when you resume from hibernation. If you shut down EG then it needs some other place to store the keyboard states before shutdown. I figured the lights on the keyboard are not a problem if you'd actually power off your machine though.
-jinxdone
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Folder Name="Keyboard states" Expanded="True">
<Macro Name="Off" Expanded="True">
<Action>
EventGhost.PythonScript(u'from ctypes import WinDLL\nuser32 = WinDLL("user32")\neg.globals.keys = []\nif user32.GetKeyState(0x90) & 0x01:\n eg.globals.keys.append(\'{NUMLOCK}\')\nif user32.GetKeyState(0x14) & 0x01:\n eg.globals.keys.append(\'{CAPSLOCK}\')\nif user32.GetKeyState(0x91) & 0x01:\n eg.globals.keys.append(\'{SCROLLLOCK}\')\neg.plugins.Window.SendKeys(\'\'.join(eg.globals.keys), False)')
</Action>
</Macro>
<Macro Name="Back on">
<Action>
EventGhost.PythonScript(u"eg.plugins.Window.SendKeys(''.join(eg.globals.keys), False)")
</Action>
</Macro>
</Folder>
</EventGhost>-jinxdone
Re: Is it possible to...
Awesome, that's exactly what I needed! 
Thanx
Thanx