pythonautomationpyinstallerjythonsikuli

Can't run SIKULI script from executable and command line because methods are not defined(doubleClick() is not defined)


I am trying to create a standalone executable to run in other machines that do not have python, jython or sikuli installed. I have coded this SIKULI script with Jython by following the tutorial here. It runs just fine in the SIKULI IDE but when I export it as a standalone executable or try to run from a command line. This is the exact message I get.

Traceback (most recent call last):File "C:\Users\user\Documents\SIkuliscript.sikuli\executable.py", line 2, in <module>doubleClick(Pattern("1648827557370.png").similar(0.42).targetOffset(0,-15))NameError: name 'doubleClick' is not defined

I am not sure why it does not recognize the SIKULI methods, I would be happy if someone could explain it clearly. I open the SIKULI IDE with a jar, and just set the type of the untitled file to jython. That was me whole enviorment setup.

I tried it with pyinstaller and ran it. This is the result. I tried it via command line by following the Sikuli docs Python and jython, usage case 1. Executable error message

And the error message is up there. I am guessing I need to export it with a different way so that it recognizes SIKULI's functions?


Solution

  • export it as a standalone executable

    what exactly are you doing here?

    try to run from a command line

    how do you run what?

    following the Sikuli docs Python and jython, usage case 1

    does not link to anything, that makes sense in this context

    Executable error message

    What executable is raising this message?

    Generally: currently there is no working implementation, that allows to do what you want. The target system to run SikuliX scripts needs Java and the sikulixide...jar (recommended version 2.0.5).

    RaiMan from SikuliX