Jump to content
Sign in to follow this  

GUIOnEventMode - How does it work exactly ?!

Recommended Posts


well... it seems like the function calls are not synchronized - is it really so ?!

i mean:

Global $Waittime = 0
.... GUI BUILD + RUN....

while 1

Func OnEventFuncButtonA()
    $Waittime = 10

Func OnEventFuncButtonB()
    $Waittime = 22

Func SendMsgAfterWaitingMinutes()
.... ;waits $Waittime mins
    ...... ;Wait for timer to be equal with $Waittime which is a global !!!!
    MsgBox(0,"TIME REACHED FOR: ", $Waittime)

Seems like the above assuming is built properly will run the function SendMsgAfterWaitingMinutes simultaneously for both button A and B if we'll click them one right after the other,


we click on button A. [10 mins] and right after we click on button B. [22 mins]

will we get


twice in a row ?!

anyhow i hope someone understands me ... if not i'll try and build myself some models to test it by....

________ Edit

i'll try being more precise!

-> Does OnEvenMode has the ability to "Pull" user created functions in the middle of another user created functions or it's "Pulling" only from the main loop ?!

-> What happened with a function which is being "Pulled" out of ?! does the GUI "Skips" back to it after it's done ?!

-> If it does "Pull" functions in the middle of other functions, is there a way to make some of the functions become "Un-interruptible" ?!

Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post

Link to post
Share on other sites

Probably you want to use GaryFrost's great new timer functions - you can have quite a few of them running at the same time.

But as concerns your code - you have to have in mind the concept of program flow control. Once SendMsgAfterWaitingMinutes() is called the first time, if it has a Sleep function in it, the Sleep function has control of the program until the wait time is finished, with a few exceptions I can think of just off the top of my head:

1) If Gary's timer functions are in effect - GaryFrost's timers

2) If you use the AdLibEnable function.

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.