Spoiler anzeigen
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <EditConstants.au3>
Global $hnebenGUI = GUICreate("",200,200)
Global $Input = GUICtrlCreateInput("Gibt hier deine Stundenzahl ein!",20,50,160,20)
Global $button = GUICtrlCreateButton("test", 50, 150)
global $counter =0
GUISetState()
GUIRegisterMsg($WM_Command, "WM_Command")
While 1
$msg2 = GUIGetMsg(1)
Select
Case $msg2[0] = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
func WM_Command($hWnd, $Msg, $wParam, $lParam)
local $hwndinput
If not IsHWnd($Input) then $hwndinput = GUICtrlGetHandle($input)
$iCode = BitShift($wParam, 16)
switch $lParam
case $Input, $hwndinput
switch $iCode
case $EN_Setfocus
ConsoleWrite($counter & " | " & $iCode & @CRLF)
EndSwitch
EndSwitch
$counter +=1
Return $GUI_RUNDEFMSG
EndFunc
So müsste es hinhauen.