Jump to content

Recommended Posts

Posted

hey, im new to using AutoIt and i just have 2 very quick questions.

1) how to make a section of script to loop a certain # of times.

2) how to make a main script run a secondary script.

[center].: If I Ask A Question, Thanks For The Help! :.[/center][center].: Welsh :.[/center]

Guest Mixture63
Posted (edited)

  Welsh said:

hey, im new to using AutoIt and i just have 2 very quick questions.

1) how to make a section of script to loop a certain # of times.

2) how to make a main script run a secondary script.

1)

for $I = 1 to 50
;Code that loops 50 times.
next

The variable $I is increased on each loop. It starts at 1 and continues to 50. If you want to know what number it is at...

you just use variable $I.

It doesn't have to be $I though, it could be $Whatever. For $Whatever = -30 to 2

You see?

2)

run("C:\Program Files\AutoIt3\AutoIt.exe", "TheScriptPath", @SW_HIDE)
Edited by Mixture63
Posted

thank, the loop part worked great. but i cant get the secondary script to run i keep getting errors. so i compiled the secondary script to an exe. and that works. but when i try to run more than 1 secondary script they all run at once.

[center].: If I Ask A Question, Thanks For The Help! :.[/center][center].: Welsh :.[/center]

Guest Mixture63
Posted

  Welsh said:

thank, the loop part worked great. but i cant get the secondary script to run i keep getting errors. so i compiled the secondary script to an exe. and that works. but when i try to run more than 1 secondary script they all run at once.

Did you try RunWait?

Posted (edited)

  Mixture63 said:

Did you try RunWait?

yes, i just tried that and it works great. thanks for the help. But i cant get a script to run without compiling it to an exe.

Edited by Welsh

[center].: If I Ask A Question, Thanks For The Help! :.[/center][center].: Welsh :.[/center]

Posted (edited)

RunWait(@AutoItEXE & ' "C:\Path\To\Script.au3"')

Edit: If your secondary script resides in the same directory as the primary one:

RunWait(@AutoItEXE & ' "' & @ScriptDir & '\Script.au3"')
Edited by LxP
Posted

  Valuater said:

We are all guessing...

Show us your script and maybe we can understand how to help you better

8)

doesnt matter know worked around it. actually made it easier.

[center].: If I Ask A Question, Thanks For The Help! :.[/center][center].: Welsh :.[/center]

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
  • Recently Browsing   0 members

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