← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #162885]: use parameters

 

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

Calle Rundgren gave more information on the question:
This may not be the best explanation. Here is a little better one:

def findElement(self, image1, image2, image3): #different images I want to have in my function
    if exists(one of the images)
        click(getLastMatch)

To call this function I would use this code in another file to where I
imported the function.

findElement(image1)    #here the wanted image is declared. I want to search for image1.
                      

Which is the right solution if i want the script to search for the image
I have putted as a parameter in where i executed the script? .

This would be nice becouse that I only have to write one function and
just adjust which image I want to search for.

This is just a example, I think this could be used on longer scripts
aswell.

Have a nice day1 :-)

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