wccppp Posted January 18, 2007 Share Posted January 18, 2007 Hello, Is there a way to determine whether CAPSLOCK in ON or OFF? Thank you. -- wcc Link to comment Share on other sites More sharing options...
wccppp Posted January 18, 2007 Author Share Posted January 18, 2007 Found answer in this forum. Should have searched first. Sorry. Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 18, 2007 Share Posted January 18, 2007 Hi, #include <Misc.au3> Global $dll = DllOpen("user32.dll") Global $num = DllCall("user32.dll", "long", "GetKeyState", "long", 0x90) ; NumPad Global $rollen = DllCall("user32.dll", "long", "GetKeyState", "long", 0x91) ; Rollen Global $capslock = DllCall("user32.dll", "long", "GetKeyState", "long", 0x14) ; Capslock Global $tasten[3] = [$num[0], $rollen[0], $capslock[0]] Global $string[3] = ["NumPad", "Rollen", "CapsLock"] For $i = 0 To UBound($tasten) - 1 If $tasten[$i] = 1 Then _FunktionWennAktiv($string[$i]) Else _FunktionWennNICHTAktiv($string[$i]) EndIf Next Func _FunktionWennAktiv($taste) MsgBox(64, "A", $taste & " is activ!") EndFunc ;==>_FunktionWennAktiv Func _FunktionWennNICHTAktiv($taste) MsgBox(64, "N", $taste & " is not aktiv!") EndFunc ;==>_FunktionWennNICHTAktiv While 1 Sleep(25) If _IsPressed("01", $dll) Then ToolTip("Left Mouse", 0, 0, "MouseClick", 1) If _IsPressed("02", $dll) Then ToolTip("Right Mouse", 0, 0, "MouseClick", 1) WEnd DllClose($dll) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
wccppp Posted January 19, 2007 Author Share Posted January 19, 2007 Thank you Mega. 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