Looping with incremental number in type filed

Asked by sri on 2018-07-01

Hi,

I am very new to sikuli. Need your help. I prepared image clicking like the below code. I am trying to click on few buttons where it will open a print page and I will be giving the number as save page number to save the document (by giving in type field). I would like to repeat the same activity for 200 pages in the e-book. How should I implement the incremental number in the type ("pagenumber"+KEy.ENTER)? or any other code?

How to make the below statement's to loop for 200 times by increasing the input value in one of the screen ( type in the below code).

    click("1530447294924.png")
    wait ("1530447325206.png")
    click ("1530447343712.png")
    wait ("1530447376641.png")
    type ("1"+Key.ENTER)
    wait ("1530447934594.png")
    click ("1530447952404.png")
    wait (1)
    click ("1530448147670.png")
    wait (1)

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-07-01
Last reply:
2018-07-01
masuo (masuo-ohara) said : #1

[Python example:]
for p in range(1,201):
    type("%d" % p + Key.ENTER)
    wait(1)

Can you help with this problem?

Provide an answer of your own, or ask sri for more information if necessary.

To post a message you must log in.