Sign in to follow this  
Followers 0
Ivanka

New UserID & PW at each loop

3 posts in this topic

Hi I have 3 UserIDs and Passwords and each time I take a new loop I have to take one of them.

I tried this here but at each new loop I got the same Nick and Password out:

;Declaire our constants and fill the arrays

Const $Nick[3] = ["Nick1", "Nick2", "Nick3"]

Const $PW[3] = ["PW1", "PW2", "PW3"]

Local $iCounter = 0, $aMsg = ""

Local $zCounter = 0, $bMsg = ""

;;;;;;;Loop Nick

For $iCounter = 0 To UBound($Nick) - 1

$aMsg = $aMsg & StringStripCR($Nick[$iCounter])

;;;;;;;Loop PW

For $zCounter = 0 To UBound($PW) - 1

$bMsg = $bMsg & StringStripCR($PW[$zCounter])

;<---- I do some click and tabs things here

;<---- also I send the Nick and PW

Send($aMsg)

Send($bMsg)

Next

Next

Can somebody give me an example how this can be done?

Share this post


Link to post
Share on other sites



1

Welcome to the AutoIt Forums

2

maybe this

;Declaire our constants and fill the arrays

$Nick = StringSplit("Nick1,Nick2,Nick3", ",")
$PW = StringSplit("PW1,PW2,PW3", ",")
Local $iCounter = 0, $aMsg = ""
Local $zCounter = 0, $bMsg = ""

;;;;;;;Loop Nick
For $iCounter = 1 To $Nick[0]
;$aMsg = $aMsg & StringStripCR($Nick[$iCounter])
    MsgBox(64,"User", $Nick[$iCounter] )
;;;;;;;Loop PW
;For $zCounter = 0 To UBound($PW) - 1
;$bMsg = $bMsg & StringStripCR($PW[$zCounter])
    MsgBox(64,"Password", $PW[$iCounter] )

;<---- I do some click and tabs things here
;<---- also I send the Nick and PW
Send($Nick[$iCounter])
Send($PW[$iCounter])

Next
;Next

3

A great place to start is

"Welcome to AutoIt 1-2-3"...its in my signature below

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thank you Valuater for the help. Your example helped. It works now like it should.

This here is really great forum with great community. I will visit the Links in your sign too and learn some other stuff too.

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