Sign in to follow this  
Followers 0
sleepy

Getting multiple RunWait to work in do loop

5 posts in this topic

I have a simple do loop and within the loop I need it to

run commands one after the other. I have the loop set now to

3 and I expect each runwait to be called one after the other.

I am however seing that each runwait is called 3 times then

the next one. What am I missing here.

; Set the counter

$count = 1

; Execute the loop "until" the counter is greater than 5

Do

; Print the count

;MsgBox(0, "COUNT NUMBER", "Count is:" & $count, 3)

RunWait("E:\share-main\Autoit\RGDK\reboot.au3.exe", "", @SW_MINIMIZE)

RunWait("E:\share-main\Autoit\RGDK\telstar-getuptime.au3.exe", "", @SW_MINIMIZE)

RunWait("E:\share-main\Autoit\RGDK\file-check.au3.exe", "", @SW_MINIMIZE)

; Increase the count by one

$count = $count + 1

Until $count > 3

Share this post


Link to post
Share on other sites



...I am however seing that each runwait is called 3 times then the next one...

I do not see that behavior with this simple test script:
For $i = 1 To 3
    RunWait("notepad")
    RunWait("calc")
Next
Do you?

(Manually kill each window.)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

I do not see that behavior with this simple test script:

For $i = 1 To 3
    RunWait("notepad")
    RunWait("calc")
Next
Do you?

(Manually kill each window.)

Well thanks for the direction, but still have the same problem, my three scripts do close all windows and then exits.

Share this post


Link to post
Share on other sites

Well thanks for the direction, but still have the same problem, my three scripts do close all windows and then exits.

Then I take it that notepad and calc behaved as expected for you, but not your script that calls 3 other scripts via RunWait? Sorry, I don't know why that would be - perhaps you could post some small scripts that would allow us to reproduce the problem.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Then I take it that notepad and calc behaved as expected for you, but not your script that calls 3 other scripts via RunWait? Sorry, I don't know why that would be - perhaps you could post some small scripts that would allow us to reproduce the problem.

Thanks much anyway

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