Madman Posted October 14, 2006 Share Posted October 14, 2006 I was bored decied to play with the ligts on the keyboard ;p Here a part of the code... Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}") If $OneNum And BitAND(GUICtrlRead($OneNum), $GUI_CHECKED) = $GUI_CHECKED Then If $TwoCaps And BitAND(GUICtrlRead($TwoCaps), $GUI_CHECKED) = $GUI_CHECKED Then Sleep($SleepTime) Send("{NUMLOCK on}") Sleep($SleepTime) Send("{CAPSLOCK on}") Sleep($SleepTime) Send("{SCROLLLOCK on}") Sleep($SleepTime) Send("{NUMLOCK off}") Sleep($SleepTime) Send("{CAPSLOCK off}") Sleep($SleepTime) Send("{SCROLLLOCK off}") It supposed to set all locks off, then num on,caps on,scroll on, each with a second appart ($SleepTime = 1second ), and then num off, caps off, scroll off. But what it does... locks off,num on,caps on, (here's the prob) scroll on and caps off,num off, "caps off", scroll off. Why does caps go off when scroll turn on? Is it an Xp, AutoIt or Swe Keyboard prob? Link to comment Share on other sites More sharing options...
AceLoc Posted October 14, 2006 Share Posted October 14, 2006 http://www.autoitscript.com/autoit3/docs/a...ix/SendKeys.htm [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Madman Posted October 15, 2006 Author Share Posted October 15, 2006 http://www.autoitscript.com/autoit3/docs/a...ix/SendKeys.htmI tried sending just {CapsLock} instead of {CAPSLOCK on}, that didn't help.I also tried Opt("SendCapslockMode",1)If that's not what you wanted me to see, please tell me what you meant.... Link to comment Share on other sites More sharing options...
1905russell Posted October 15, 2006 Share Posted October 15, 2006 I was bored decied to play with the ligts on the keyboard ;p Here a part of the code... Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}") If $OneNum And BitAND(GUICtrlRead($OneNum), $GUI_CHECKED) = $GUI_CHECKED Then If $TwoCaps And BitAND(GUICtrlRead($TwoCaps), $GUI_CHECKED) = $GUI_CHECKED Then Sleep($SleepTime) Send("{NUMLOCK on}") Sleep($SleepTime) Send("{CAPSLOCK on}") Sleep($SleepTime) Send("{SCROLLLOCK on}") Sleep($SleepTime) Send("{NUMLOCK off}") Sleep($SleepTime) Send("{CAPSLOCK off}") Sleep($SleepTime) Send("{SCROLLLOCK off}") It supposed to set all locks off, then num on,caps on,scroll on, each with a second appart ($SleepTime = 1second ), and then num off, caps off, scroll off. But what it does... locks off,num on,caps on, (here's the prob) scroll on and caps off,num off, "caps off", scroll off. Why does caps go off when scroll turn on? Is it an Xp, AutoIt or Swe Keyboard prob?Not sure if this will help but I had a similar problem that I resolved with Send("+{CAPSLOCK}") Link to comment Share on other sites More sharing options...
Madman Posted October 15, 2006 Author Share Posted October 15, 2006 Not sure if this will help but I had a similar problem that I resolved with Send("+{CAPSLOCK}") Nope didn't help I also tried to add a Caps on after the scroll on... Sleep($SleepTime) Send("{CAPSLOCK on}") Sleep($SleepTime) Send("{SCROLLLOCK on}") Send("{CAPSLOCK on}") Sleep($SleepTime) Send("{NUMLOCK off}") That hepled, but, in next step, when num off, then caps off as well... The only soultion i see, is to send num,caps,scroll state for each on/off, but that would make the code about 3x times longer, so i rather avoid that... Link to comment Share on other sites More sharing options...
AzKay Posted October 15, 2006 Share Posted October 15, 2006 Maybe {CAPSLOCK DOWN}? @Aceloc, Didnt you quit? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Madman Posted October 16, 2006 Author Share Posted October 16, 2006 Maybe {CAPSLOCK DOWN}?@Aceloc, Didnt you quit?That hepled, but, when num off, then caps off as well... Link to comment Share on other sites More sharing options...
Madman Posted October 17, 2006 Author Share Posted October 17, 2006 Well...Made a work around, that don't require 3x code =) Func LED($num,$caps,$scroll) ; Scroll is fist beacuse it's cause probs If $scroll == "0" Then Send("{SCROLLLOCK off}") ElseIf $scroll == "1" Then Send("{SCROLLLOCK on}") EndIf If $num == "0" Then Send("{NUMLOCK off}") ElseIf $num == "1" Then Send("{NUMLOCK on}") EndIf If $caps == "0" Then Send("{CAPSLOCK off}") ElseIf $caps == "1" Then Send("{CAPSLOCK on}") EndIf EndFunc Link to comment Share on other sites More sharing options...
1905russell Posted October 17, 2006 Share Posted October 17, 2006 (edited) I'll not repost with 8 cases in a Select. Your 3 ifs do the job you wanted. You need Opt("SendCapslockMode",0) to work this - right? Edited October 17, 2006 by 1905russell Link to comment Share on other sites More sharing options...
Madman Posted October 17, 2006 Author Share Posted October 17, 2006 (edited) I'll not repost with 8 cases in a Select. Your 3 ifs do the job you wanted.You need Opt("SendCapslockMode",0) to work this - right?Nope, it works just fine without any Opt.. Edited October 17, 2006 by Madman Link to comment Share on other sites More sharing options...
1905russell Posted October 17, 2006 Share Posted October 17, 2006 (edited) Nope, it works just fine without any Opt..Okay got it - default it is.Thanks Edited October 17, 2006 by 1905russell 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