Sign in to follow this  
Followers 0
menzow

multiple Loops?

3 posts in this topic

Is it posseble to make multiple loops?

because if I use

While 1

sleep (30)

<-somecode->

WEnd

While 1

sleep(100)

<some_other_code->

WEnd

It doesnt do the second loop :S

Is it possible to make multiple loops?

Share this post


Link to post
Share on other sites



Is it posseble to make multiple loops?

because if I use

While 1

sleep (30)

<-somecode->

WEnd

While 1

sleep(100)

<some_other_code->

WEnd

It doesnt do the second loop :S

Is it possible to make multiple loops?

Your pseudo-script is stuck in the first loop because you never ExitLoop, so it never gets to the second loop. AutoIt is single-threaded, so you can't have two different loops running at the same time. Proper use of AdLibEnable() could simulate that, though.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

As I have heard autoit don't support it, so you have to use other method.You can Write 2 scripts and then execute them. If you do not want compile your other scripts you can use:

_RunAu3AsExe('SOMESCRIPT.AU3')

Func _RunAu3AsExe($hAutoItExe, $hFileIn, $strParams = "", $sWorkingDir = "", $sShowHide = @SW_HIDE, $nSTDOut = 0);Returns PID of newly spawned exe
    Return Run('"' & $hAutoItExe & '" /AutoIt3ExecuteScript "' & _
            $hFileIn & '"' & $strParams, $sWorkingDir, $sShowHide, $nSTDOut)
EndFunc   ;==>_RunAu3AsExe
Edited by au3scr

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  
Followers 0