sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03785
Re: [Question #163613]: After a script runs 50 times I want to add a different keystroke to the script, how do I code that?
Question #163613 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/163613
Status: Answered => Solved
joel hatzfeld confirmed that the question is solved:
for n in range(375):
if n <= 74:
type("1")
elif n > 74 and n < 150:
type("2")
elif n >149 and n < 225:
type("X")
elif n >224 and n <300:
type("4")
else:
type("5")
wait(3)
type("T")
find(<image>)
click(<image>)
type(Key.ESC)
hover(<second image>)
wait(20)
rightClick(<third image>)
wait(6)
trying this now, if it works, then I'm going to to amend it one more
time and try the following,
if n = 75:
type("1")
if n = 150
type("2")
etc..., so that it only attempts to press the 1 hotkey one time instead
of every cycle between the ranges 1-75, or 75-150 and so on.
Thank you for your help Raiman, I appreciate it.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.