babou 0 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 Share this post Link to post Share on other sites
ksmith247 0 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] Share this post Link to post Share on other sites
babou 0 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 ? Share this post Link to post Share on other sites
Monamo 4 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] Share this post Link to post Share on other sites
babou 0 Posted September 11, 2007 great thanks a lot it woks Share this post Link to post Share on other sites
MagnumXL 2 Posted December 11, 2007 Thank you for and gafrost for this! Share this post Link to post Share on other sites