← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #214725]: Facing issue while importing Sikuli script in Eclipse

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- not really, what I told you :-(

To get the above running you need the following structure:

-- is a folder
-f- is a file
--content means: the following lines should be in the file before

C:\Users\ambigaj\PathToMyImage\
-- ImageX.sikuli
   -f- ImageX.py
        --content
        from sikuli import *
        imgx = "1353581350510.png"
        patx = Pattern(imgx).similar(0.7).targetOffset(0,0)
   -f- 1353581350510.png
   
The structure ImageX.sikuli would be produced by the IDE, if would put the 3 lines in the IDE and save it to ImageX in the folder C:\Users\ambigaj\PathToMyImage\
But you could also produce the above structure with Eclipse: make a folder xxx.sikuli and create inside that folder a xxx.py (same name as the containing folder!) and put all images needed into xxx.sikuli.

BTW: when using from xxx import * an additional import xxx does not make
sense.

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