Jump to content

multiple Loops?


menzow
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...