Holger Posted February 23, 2005 Posted February 23, 2005 Hi outthere I have a thinking/logical problem. You know in the past it was possible to check if there is only a clicking/other GUI event in the queue with GUIMsg(0). Now we don't have this anymore. So, what I want to do?: Yeah...I have a simple GUI with a button. This button starts a procedure/function. Now - this function is a recursive function like FileSearching. So in this function I want to check if there is a clicking event. But this is the problem! If I use the OnEvent-mode then there is no message forwarding. If I use the GUIGetMsg-loop I have after few seconds the internal 'sleep'-effect (cause there is no msg in the queue at this moment). Does anybody knows you to get a GUI-message-event in a subfunction with using the OnEvent-mode? I have absolutely no idea anymore Thanks Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Alterego Posted February 23, 2005 Posted February 23, 2005 i probably dont understand what your saying...but if I do...I used AdlibEnable This dynamic web page is powered by AutoIt 3.
Holger Posted February 23, 2005 Author Posted February 23, 2005 @Alterego: thanks for answer. But I have solved my thinking problem I have to use a function call for the "GuiOnEventMode" only for switching the process on and off and not for calling a subfunction. Here is what I mean: Opt("GUIOnEventMode",1) #include <GUIConstants.au3> Global $run = 0 GUICreate("test") $label = GUICtrlCreateLabel("",10,10,100,20) $button = GUICtrlCreateButton("Start",10,50,70,20) GUICtrlSetOnEvent(-1,"ButtonEvent") GUISetState() $i = 0 While 1 Sleep(20) If $run = 1 Then $i = $i + 1 GUICtrlSetData($label,$i) EndIf WEnd Exit Func ButtonEvent() If $run = 0 Then $run = 1 Else $run = 0 EndIf EndFunc This is a very simple script but similar to mine. So what I did first wrong was to call the GUICtrlSetData- and adding function in the "ButtonEvent" itself so this event was only fired 1 time and then never again before this function ended. However now I know what I have to do Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
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