Code: Select all
Gui, Add, UpDown, gButton, 5
gui, show, w200 h200
return
Button: ;______________ get ______________
msgbox, % A_GuiControl " - " a_guievent " - " A_EventInfo
return
guiclose: ;__________ guiclose __________
exitapp
Code: Select all
Gui, Add, UpDown, gButton, 5
gui, show, w200 h200
return
Button: ;______________ get ______________
msgbox, % A_GuiControl " - " a_guievent " - " A_EventInfo
return
guiclose: ;__________ guiclose __________
exitapp
Code: Select all
Test := 5
Gui, Add, Edit,
Gui, Add, UpDown, vValue gButton,5
gui, show, w200 h200
return
Button: ;______________ get ______________
Gui, Submit, NoHide
Diff := Value - Test
Test := Value
If Diff > 0
MsgBox It went up!
If Diff < 0
MsgBox It went down!
return
Thanks for your code, but I was expecting something like the code below:jackdunning wrote:.
Code: Select all
gui, add, ddl, +HwndDDLId, A|B|C|D|E||F|G|H
gui, add, button, x+5 h11 w20 gUpDown, ▴
gui, add, button, y+0 h11 w20 gUpDown, ▾
gui, show
return
UpDown: ;_________________ UpDown ____________________
;"==" is always case-sensitive
if (a_guicontrol == "▴")
ControlSend , , {Up}, % "ahk_id" DDLId
if (a_guicontrol == "▾")
ControlSend , , {Down}, % "ahk_id" DDLId
return
guiclose: ;_________________ gui close _________________
exitapp
Code: Select all
#NoEnv
Gui, Margin, 20, 20
Gui, Add, DDL, w200 vList +HwndDDLId, A|B|C|D|E||F|G|H
Gui, Add, UpDown, Range1-8 vValue gUpDown, 5
Gui, Show, , UpDown Test
UpDown: ;_________________ UpDown ____________________
GuiControl, +AltSubmit, List ; if not specified above as a DDL option
GuiControlGet, List
GuiControl, -AltSubmit, List
If (Value <> List)
Control, Choose, %Value%, , ahk_id %DDLId%
Return
GuiClose: ;_________________ Gui close _________________
ExitApp
Users browsing this forum: Google [Bot] and 156 guests