← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242701]: How to see execution image in Eclipse console editor

 

Question #242701 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242701

    Status: Open => Answered

RaiMan proposed the following answer:
Supposing you are talking about the image, that is used for an implicit
(e.g. with click()) or explicit find operation (like find, wait, ...), I
have to say sorry.

currently there is no option, that allows you to simply get the used
image's filename to stdout.

This will only be available beginning with version 1.1.0 in a few weeks
(currently still no beta, sorry).

the only rather easy way is to make 3 tiny wrapper functions and
generally use these.

def myFind(img, reg=SCREEN):
    print "myFind: using: " + img + " in: " + reg
    return reg.find(ing)

def myWait(img, time, reg=SCREEN):
    print "myWait: using: " + img + " in: " + reg
    return reg.wait(img, time)

def myExists(img, time, reg=SCREEN):
    print "myExists: using: " + img + " in: " + reg
    return reg.exists(img, time)

with the usage:
if (myExists(some_image, 0, some_region)):
    click(myFind(some_other_image))
else:
    myWait(some_other2_image, 10)

In the above functions you have every option, to pimp your printout.

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