Search the Community
Showing results for tags '_ispressed(12)'.
-
hello guys. im working on best hotkeys system. there is a problem with ALT. CTRL and SHIFT working good but i have same function for ALT and it work like SWITCH (unwanted) any tips how fix problem ?? stupid question what sense to add $hDLL = DllOpen("user32.dll") ?? here is my code i started today #include <Misc.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> HotKeySet("{q}", "_quit") $GUI = GUICreate("set hotkeys", -1,-1) GUISetState() $button_hotkey = (GUICtrlCreateButton("", 80, 30, 150, 25)) $start = False $CTRL = False $SHIFT = False $ALT = False $FUNC_KEY = False $key = False $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "" While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $button_hotkey $start = True $SHIFT = False $CTRL = False $ALT = False $FUNC_KEY = False $key = False $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "" GUICtrlSetData($button_hotkey, "?") EndSwitch If $start = True And _IsPressed('10') and $SHIFT = False Then $klawisz_shift = "SHIFT + " GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) $SHIFT = True $FUNC_KEY = True ElseIf $start = True And Not _IsPressed("10") And $SHIFT = True Then $klawisz_shift = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) $SHIFT = False $FUNC_KEY = False EndIf If $start = True And _IsPressed('11') and $CTRL = False Then $klawisz_ctrl = "CTRL + " GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) $CTRL = True $FUNC_KEY = True ElseIf $start = True And Not _IsPressed("11") And $CTRL = True Then $klawisz_ctrl = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) $CTRL = False $FUNC_KEY = False EndIf If $start = True And _IsPressed('12') and $ALT = False Then $klawisz_alt = "ALT + " GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) $ALT = True $FUNC_KEY = True ElseIf $start = True And Not _IsPressed("12") And $ALT = True Then $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) $ALT = False $FUNC_KEY = False EndIf ;/////// /////// /////// /////// /////// /////// /////// /////// /////// If _IsPressed('31') and $FUNC_KEY = True And $key = False Then $klawisz1 = "1" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz1) $key = True $FUNC_KEY = False $start = False EndIf WEnd Func _quit() Exit EndFunc ;==>_quit