au3scr Posted September 9, 2008 Share Posted September 9, 2008 Hi all. I am trying to run function every time $Edit1 is changed, but script made by koda dont work... I mean when I change text in $Edit1 then nothing happens. What I need to do to have action on edit1 change? I also tried Case $edit1.change as it is in most languages I've seen but thistime it didnt work. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 202, 111, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 8, 185, 89) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Edit1 do_Func () EndSwitch WEnd Func do_Func () MsgBox (1,"I Am function","which makes me cool") EndFunc Link to comment Share on other sites More sharing options...
youknowwho4eva Posted September 9, 2008 Share Posted September 9, 2008 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <Timers.au3> $start=_Timer_Init() $test = "Edit1" #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 202, 111, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 8, 185, 89) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case _timer_diff($start) = 2 If $test <> guictrlread($edit1) then do_Func () $test = guictrlread($Edit1) $start=_Timer_Init() Else $test = guictrlread($Edit1) $start=_Timer_Init() Endif Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func do_Func () MsgBox (1,"I Am function","which makes me cool") EndFunc Giggity Link to comment Share on other sites More sharing options...
au3scr Posted September 9, 2008 Author Share Posted September 9, 2008 (edited) Thanks a lot, it works. Where you learn such things? And how u know how mix functions to working thing. Teach me please. Edited September 9, 2008 by au3scr Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now