How to type string+integer names?

Asked by srijith

 I want to have a while loop which goes on doing some action.
In between It has to type " user1" during its first time execution and "user2" during second time, similarly "user3", "user4" etc.

eg:

while not find():
 click()
 click()
 type(" user+x" ) // Each time the x value shud increment by 1.intension is to have a unique name every time the while loop runs
 click()
 click()
popup("E").

Plaese help me in this .

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
srijith
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

x = 0 # start value
while not find():
 click()
 click()
 x += 1 # increments x
 type("user"+str(x)) # str(x) gives x as text an + concatenates it to "user"
 click()
 click()
popup("E").

Revision history for this message
srijith (electronicmails1) said :
#2

this example works fine!