babou Posted September 7, 2007 Share Posted September 7, 2007 helo all I have a problem with XP and the num lock keyboard, the script change the registry key : if RegRead ("HKEY_CURRENT_USER\Control Panel\keyboard", "InitialKeyboardIndicators") <> "2" Then RegWrite ("HKEY_CURRENT_USER\Control Panel\keyboard","InitialKeyboardIndicators", "REG_SZ", "2") it is a simple script, it run and write the right value in the registry, but num lock still state ... when I change the value manualy, it works Do you why ? Thanks Link to comment Share on other sites More sharing options...
ksmith247 Posted September 7, 2007 Share Posted September 7, 2007 helo all I have a problem with XP and the num lock keyboard, the script change the registry key :if RegRead ("HKEY_CURRENT_USER\Control Panel\keyboard", "InitialKeyboardIndicators") <> "2" Then RegWrite ("HKEY_CURRENT_USER\Control Panel\keyboard","InitialKeyboardIndicators", "REG_SZ", "2")it is a simple script, it run and write the right value in the registry, but num lock still state ...when I change the value manualy, it works Do you why ?ThanksThat reg key indicates numlock state after logon. You wont see a change until you log off then back on. If the value is 2, numlock should be on after you log in. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
babou Posted September 10, 2007 Author Share Posted September 10, 2007 That reg key indicates numlock state after logon. You wont see a change until you log off then back on. If the value is 2, numlock should be on after you log in.It is the pb, the script put the reg value to 2, I log off and log on, then the num lock state after logon.i do not understand why ? Link to comment Share on other sites More sharing options...
Monamo Posted September 10, 2007 Share Posted September 10, 2007 (edited) It is the pb, the script put the reg value to 2, I log off and log on, then the num lock state after logon. i do not understand why ?I've encountered the same problem - Even with the reg change, my NumLock is off after every reboot. To resolve this, I've added a script with the following content and set it to run on startup: Global Const $VK_NUMLOCK = 0x90 $NumState = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_NUMLOCK) If $NumState[0] <> 1 Then Send("{NUMLOCK}") EndIf I'd give credit to the code to whomever had posted the status of the NumLock key, but I can't remember which post I got it from. Edit: credit to gafrost in this post for the NumLock status checks. Edited September 10, 2007 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
babou Posted September 11, 2007 Author Share Posted September 11, 2007 great thanks a lot it woks Link to comment Share on other sites More sharing options...
MagnumXL Posted December 11, 2007 Share Posted December 11, 2007 Thank you for and gafrost for this! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now