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

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

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

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.

Create an account

Register a new account