Discussion in 'Software Q&A' started by eureca_eureca, Dec 19, 2005.
you can find it from www.planet-source-code.com
ghemant i couldnt ind that script there ..
NumLock on or Off
please find the link for HOW TO CAPTURE A KEY STROKES USING JAVA SCRIPT , NOW I THINK YOU CAN DO THE TWEAK.
ghemant that code will capture key codes, bu how to get true or false for the num lock , ie if its on or of ?
BTW, why do you want to do it? Perhaps an alternative method might be available. Or perhaps you can use a different scripting tool that can check the status such as VBScripts though not sure if they have ability to do it...
Num Lock Status
Status of Num Lock, Caps Lock, Scroll Lock, etc. is stored in memory at location number 0x417. Now C lets you use pointers and access that memory location and with the value stored there you can find out the state.
VB is a totally different thing altogether. Although, there are no pointers, there are built-in functions/controls to do this.
But don't lost heart, keep trying and let us all know if you find it
i tried saearching for vbscript too , i couldnt find there too..
Thx ever one for the help ..
However, there is a workaround. U need to build a COM wrapper for a suitable API, viz, "GetAsyncKeyState" and use that object through ur vbs program. You have to distribute that COM object also with ur script file in case u need to run it somewhere else.
Separate names with a comma.