← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #692511]: project extending SikuliX functionality

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Ok, understood.

Then as a base you have to do everything like mentioned above.

To use your defined functions undotted like click(), ... they have to be added to the globals inventory.
This is a dynamic process at runtime.

How this is done in SikuliX can be found in Sikuli.py, which is triggered at runtime by a
from sikuli import *

before a script is executed (automatically for main scripts, added into
imported scripts)

The top function is
use()

which defines the global constant SCREEN object.

use() then internally calls 
_exposeAllMethods(...)

which does the registering of the class Screen methods.

... but you will not get what you want without at least one import at
the top of all your scripts.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.