Edit
control documentation :
http://ahkscript.org/docs/commands/GuiControls.htm#Edit
UpDown
control documentation :
http://ahkscript.org/docs/commands/GuiControls.htm#UpDown
OnMessage()
function documentation :
http://ahkscript.org/docs/commands/OnMessage.htm
Example Implementation :
Gui, Add, Edit, gEventHandler vMyEditControl
Gui, Add, UpDown, vMyUpDown Range1-10, 5
Gui, Show
OnMessage(WM_KEYUP:=0x101,"WM_KEYUP") ; WM_KEYUP msg, see http://msdn.microsoft.com/library/ms646281
return
GuiClose: ; exit app on 'guiclose' event
ExitApp
EventHandler: ; This label is launched when the contents of the edit has changed
GuiControlGet,value,,MyEditControl
MsgBox MyEditControl contains "%value%".
return
WM_KEYUP(wParam, lParam) { ; this function is launched on 'Key Up' event
if (wParam==0x0D) ; vk codes, see http://msdn.microsoft.com/library/dd375731
MsgBox Enter was pressed in MyEditControl.
}