sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32798
[Question #267843]: Please, I need help with a looping through a list
New question #267843 on Sikuli:
https://answers.launchpad.net/sikuli/+question/267843
Hi! So I have a long script that logs in to accounts and does some actions then logs out, then repeats. I made a list of the logins that I want the script to loop through, but ONE BY ONE as the script starts over. So for example it looks kinda like this:
while True: #to loop infinitely I guess? sorry I'm still learning
click ("blah.png")
logins = ['log1@xxxxxxxx', 'log2@xxxxxxxx', etc]
for x in logins:
type("%s" %x + Key.TAB)
type("pass" + Key.ENTER)
#after this is all just the actions I need to be done
#the script will then log out of the account but I want it to go the NEXT emai (log2@xxxxxxxx) l after going through the first one (log1@xxxxxxxx)
I'm probably doing this in a very inefficient way but what happens is that all the emails are typed into the email box at once. I've tried breaking the loop but then it will start over to the first email when the whole script loops again. If anyone could please help me out with this, I'd really really appreciate it! Thanks in advance!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.