Jump to content

Do loop, or a for loop


Recommended Posts

Hi Guys,

Cant get this to run through all the steps, any ideas. I have tried with a Do and a for but no luck.

Do

$n=0

ControlSend($JASWind, "", "", "{TAB}")

Sleep(5000)

If $n = 5 Then

Sleep(5000)

ControlSend($JASWind, "", "", "\\shjdedp01\B7334\PY7334\PACKAGE\AUTODEPLOY\work\GeneratorList.txt")

Else If $n = 12 Then

Sleep(5000)

ControlSend($JASWind, "", "", "ENTER")

Else If $n = 13 Then

Sleep(5000)

ControlSend($JASWind, "", "", "{ALTDOWN}f{ALTUP}b{ENTER}")

EndIf

$n=$n+1

Until $n=13

Link to comment
Share on other sites

Try:

$n = 0

Do

    ControlSend($JASWind, "", "", "{TAB}")
    Sleep(5000)


    If $n = 5 Then
        Sleep(5000)
        ControlSend($JASWind, "", "", "\\shjdedp01\B7334\PY7334\PACKAGE\AUTODEPLOY\work\GeneratorList.txt")
    Else If $n = 12 Then
        Sleep(5000)
        ControlSend($JASWind, "", "", "ENTER")
    Else If $n = 13 Then
        Sleep(5000)
        ControlSend($JASWind, "", "", "{ALTDOWN}f{ALTUP}b{ENTER}")
    EndIf
    $n = $n + 1
Until $n = 13

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Try:

$n = 0

Do

    ControlSend($JASWind, "", "", "{TAB}")
    Sleep(5000)
    If $n = 5 Then
        Sleep(5000)
        ControlSend($JASWind, "", "", "\\shjdedp01\B7334\PY7334\PACKAGE\AUTODEPLOY\work\GeneratorList.txt")
    Else If $n = 12 Then
        Sleep(5000)
        ControlSend($JASWind, "", "", "ENTER")
    Else If $n = 13 Then
        Sleep(5000)
        ControlSend($JASWind, "", "", "{ALTDOWN}f{ALTUP}b{ENTER}")
    EndIf
    $n = $n + 1
Until $n = 13

stupid stupid stunt :), thanks dude.

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...