#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
Global $hGui, $nInput1, $nInput2
$hGui = GUICreate('UberGUI', 200, 150)
$nInput1 = GUICtrlCreateInput('first', 20, 35, 125, 20)
$nInput2 = GUICtrlCreateInput('second', 20, 65, 125, 20)
$nButton = GUICtrlCreateButton('Button', 20, 90, 50, 25)
GUICtrlSetState(-1, $GUI_FOCUS)
GUISetState()
GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $nButton
MsgBox(64, 'Info', GUICtrlRead($nInput1) & @LF & GUICtrlRead($nInput2), 0, $hGui)
EndSwitch
WEnd
Func WM_COMMAND($hWnd, $imsg, $iwParam, $ilParam)
Local $nNotifyCode, $nID
$nNotifyCode = BitShift($iwParam, 16)
$nID = BitAND($iwParam, 0xFFFF)
;Switch $hWnd
;Case $hGui
Switch $nNotifyCode
Case $EN_SETFOCUS
Switch $nID
Case $nInput1
HotKeySet('1', '_MyFunc_1');1
Case $nInput2
HotKeySet('2', '_MyFunc_2');2
EndSwitch
Case $EN_KILLFOCUS
Switch $nID
Case $nInput1
HotKeySet('1')
Case $nInput2
HotKeySet('2')
EndSwitch
EndSwitch
;EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
Func _MyFunc_1()
MsgBox(64, 'Info', '_MyFunc_1' & @LF & GUICtrlRead($nInput1), 0, $hGui)
EndFunc ;==>_MyFunc_1
Func _MyFunc_2()
MsgBox(64, 'Info', '_MyFunc_2' & @LF & GUICtrlRead($nInput2), 0, $hGui)
EndFunc ;==>_MyFunc_2