Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstantsEx.au3>
- #include <Misc.au3>
- #include <GuiComboBox.au3>
- Local $hDLL = DllOpen("user32.dll")
- $Form1 = GUICreate("Form1", 310, 152, 361, 178)
- $Combo1 = GUICtrlCreateCombo("Combo1", 16, 64, 145, 25)
- GUICtrlSetData(-1, "Item1|Item2|Item3|Item4|Item5")
- $Label1 = GUICtrlCreateLabel("Press Alt+F TO select UP", 16, 16, 128, 17)
- $Label2 = GUICtrlCreateLabel("Press Alt+C TO select DOWN", 16, 40, 143, 17)
- GUISetState(@SW_SHOW)
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- DllClose($hDLL)
- Exit
- EndSwitch
- If _IsPressed(12, $hDLL) And _IsPressed(46, $hDLL) Then
- $iIndex = _GUICtrlComboBox_GetCurSel($Combo1)
- If $iIndex < _GUICtrlComboBox_GetCount($Combo1) - 1 Then
- $iIndex += 1
- $iRet = _GUICtrlComboBox_SetCurSel($Combo1, $iIndex)
- EndIf
- While _IsPressed(12, $hDLL) And _IsPressed(46, $hDLL)
- Sleep(10)
- WEnd
- ElseIf _IsPressed(12, $hDLL) And _IsPressed(43, $hDLL) Then
- ; SWITCH DOWN
- EndIf
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement