← Back to team overview

sikuli-driver team mailing list archive

[Question #265782]: Images of screen being generated and saved in images folder

 

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

OSX10.10.3 Sikuli1.1.0 Nightly 2015-04-23

I happened to notice that multiple images(8+) of the entire screen at 5mb+ a piece are being generated during script execution.

I have been trying to deal with slow script execution.

this is my script:
App.focus("Andy")
Bank = Pattern("bank-1.png").targetOffset(-59,-79)
reswnd = Region(590,222,649,357)
slider = "1429247977803.png"
maxlimit = "maxlimit.png"
house = "house.png"
mountain = "mountain.png"
reshelp = "reshelp.png"
helpbtn = "helpbtn.png"
itemtype = "wood"
resLst = [
            "FOOD.png",
            "wood.png",
            "ore.png",
            "stone.png",
            "silver.png",
        ]


#Transfer Res
for x in range(3):    
    reg = Region(574,1041,133,94)
    with reg:
        if exists(mountain,5):           
            click(getLastMatch())
            print"mountain found"
        else:
            print"mountain not found"
            break
    reg = Region(569,152,687,806)
    with reg:
        if exists(Bank,90):
            click(getLastMatch())
        else:
            print"bank not found"
            break
    reg = Region(774,484,258,73)
    with reg:
        if exists(reshelp,5):
            click(getLastMatch())
        else:
            print"reshelp not found"
            break
        wait(2)
        reg = Region(568,152,689,806)
        with reg:
            if exists(maxlimit,5):
                type(Key.ESC)
                wait(60)
        reg = Region(626,472,567,171)
        with reg:
            if exists(reshelp,5):
                click(getLastMatch())          
    if itemtype == "food":
        resImg = resLst[0]
        reg = Region(596,438,429,68)

    if itemtype == "wood":
        resImg = resLst[1]
        reg = Region(588,290,438,70)
    
    if itemtype == "ore":
        resImg = resLst[2]
        reg = Region(590,365,434,66)
    
    if itemtype == "stone":
        resImg = resLst[3]
        reg = Region(588,217,441,73)
    
    if itemtype == "silver":
        resImg = resLst[4]
        reg = Region(589,509,438,71)
    with reg:
        if exists(resImg,5): 
            t = getLastMatch().right().find(slider)            
            dragDrop(t, Location(t.x + 350, t.y))

#        if exists(reLst[4]): 
#            t = reg.find(reLst[4]).right().reg.find(slider)
#            dragDrop(t, Location(t.x + 350, t.y))
    reg = Region(844,835,135,69)
    with reg:
        if exists(helpbtn,5):
            click(getLastMatch())
        else:
            print"help not found" 


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