Jump to content

Recommended Posts

Posted (edited)

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

i mean:

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

while 1
....
wend

Func OnEventFuncButtonA()
....
    $Waittime = 10
    SendMsgAfterWaitingMinutes()
....
EndFunc

Func OnEventFuncButtonB()
....
    $Waittime = 22
    SendMsgAfterWaitingMinutes()
....
EndFunc

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

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,

eg.

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

will we get

TIME REACHED FOR:
22

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 ?!

Posted (edited)

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

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
×
×
  • Create New...