← Back to team overview

sikuli-driver team mailing list archive

[Question #200106]: selecting the next image in line

 

New question #200106 on Sikuli:
https://answers.launchpad.net/sikuli/+question/200106

I am pretty new to SIKULI, so this issue might be pretty easy to figure out, I hope.

I am having an issue with getting my script to correctly select the next image on the screen. I have a series of graphics in a Illustrator document and I want SIKULI to cycle thru and select each one in order from left to right and give each one a unique file name. The file naming is not an issue just the image selection. My code is below. Thank You.

x=0
percent=00.0
image=Pattern("01-2.png").exact()

while x <1000:
    print
    switchApp("Adobe Illustrator.app")
    type("v")
   
<!--This while loop is the problem area--> 
while x <1000:
        image=right(5)
        click(image) 
        break

    click("Edit-1.png")
    click("Cut.png")
    click("1339077451192.png")
    click("File.png")
    click("New.png")
    click("OK-1.png")
    click("Edit.png")
    click("Paste.png")
    click("OK-2.png")
    type("\r")
    click("File-1.png")
    click("SaveAs-1.png")

    while x < 1000:
    
        percent+=.1
        paste(str(percent))
        x+=1
        break

    click("Save-1.png")
    click("OK.png")

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.