I am currently creating a loop with sikuli. My problem is that i have a fixed variables that will go up to 15 with only the numbers changing at the end. I was looking for a way to combine the string component that is fixed with the integer which will be variable in the loop but then once concatenated have it identified as the predefined variable at the top of the code.
Any help would be awesome!
Dunning1 = (Pattern("Line 1.png").similar(0.97).targetOffset(445,-2))
Balance1 = (Pattern("Line 1.png").similar(0.97).targetOffset(566,-2))
Select1 = (Pattern("Line 1.png").similar(0.97).targetOffset(38,-1))
Dunning2 = (Pattern("Line 2.png").similar(0.97).targetOffset(442,-1))
Balance2 =(Pattern("Line 2.png").similar(0.97).targetOffset(565,2))
Select2 = (Pattern("Line 2.png").similar(0.97).targetOffset(37,-1))
while n < 3:
DunningX = ("Dunning"+str(n)**
print(DunningX)**
doubleClick(DunningX)
type("c",KEY_CTRL)
doubleClick(DunningX)
type("c",KEY_CTRL)
Dunning1 = Env.getClipboard()
BalanceX = ("Balance"+str(n))
doubleClick(BalanceX)
type("c",KEY_CTRL)
doubleClick(BalanceX)
type("c",KEY_CTRL)
ContractBal = Env.getClipboard()
if Dunning1 == ContractBal:
SelectX = ("Select"+str(n))
click(SelectX)
n = n + 1