First off, this means that if you're reading more than one line of email:password pairs,
the loop will proceed so fast that TrayTip will seem to only display the last set of values.
Conversely, if the last line of values in text file EmailPass.txt has a trailing newline, the TrayTip will be blank.
To remedy this, you have to:
- Trim the trailing newline from the entire list of values in Email.
- Add a sleep to slow down the loop or a MsgBox after TrayTip so you can see each set of values.
Code: Select all
FileRead, Email, C:\EmailPass.txt
CredArr := { Email : [],Password : [] }
For i, Row in StrSplit( RTrim( Email, "`n" ), "`n", "`r" ) ; <-- added RTrim( Email ) to remove trailing newlines
{
Cred := StrSplit( Row, [ ":", " " ] )
CredArr.Email.Push( LTrim( Cred.1 ) ), CredArr.Password.Push( LTrim( Cred.2 ) )
TrayTip,, % "Email " i ": " CredArr.Email[ i ] "`nPassword " i ": " CredArr.Password[ i ], 2, 0x10
Sleep 2000 ; A TrayTip with new values will be displayed every 2 seconds with new values if any
}
Return