← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #219218]: How can I call a Sikuli-function from guide?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
you have to add an additional parameter to the show() function on the
Jython level:

def show(p1, p2, runme = None):
    # current code
    # add before return or end
    if runme: runme()

and call it (your example):
show( ...., runme = foo)

-- p1, p2 are the current parameters of show() (did not look into the sources ;-)
-- runme is the new parameter that expects the NAME of a defined function (not foo() !! but foo )
-- in show, runme() runs the given function before return

That is the principle and there are surely many possible variations.

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