Or using a 'flag' to detect a change in the input and run the function.
#include <Date.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Global $__iLabel = -9999, $__iFlag = 0
Example()
Func Example()
Local $hGUI = GUICreate('Input Filter', 300, 30)
$__iLabel = GUICtrlCreateInput('', 5, 5, 290)
GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
GUISetState(@SW_SHOW)
While 1
If $__iFlag Then
$__iFlag = 0
_Change()
EndIf
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc ;==>Example
Func _Change()
ConsoleWrite('Change: ' & _Now() & @CRLF)
EndFunc ;==>_Change
Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam, $ilParam
Local $iLoWord = _WinAPI_LoWord($iwParam)
Local $iHiWord = _WinAPI_HiWord($iwParam)
Switch $iLoWord
Case $__iLabel
Switch $iHiWord
Case $EN_CHANGE
$__iFlag = 1
EndSwitch
EndSwitch
EndFunc ;==>WM_COMMAND