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

Shengyuan Gu proposed the following answer:
Hi all,
My approach to hide the splash screen is using jython to run the sikuli scripts 
without sikuli ide.

I wrapped a jython startup script name jython.bat on windows7 using the jython 
in sikulix.jar:
@echo off
chcp 437
java -Xmx512m -Xss1152k -cp D:/SikuliX110b2/sikulix.jar org.python.util.jython 
%*

Then I can use jython to run the sikuli script without splash screen:
jython login.sikuli/login.py

also, I should insert some workaround jython code in my sikuli script:
# configure execution environment for both SikuliX and Jython
# caution:!!!
# 1, __file__ is not supported in SikuliX script, so use sys.argv[0] instead
# 2, these code cannot be move to a common module
file =  sys.argv[0]
file = file.replace('\\', '/')
fullpath = os.path.realpath(file)
fullpath = fullpath.replace('\\', '/')

# jython: xxxx.sikuli/demo.py
if file.endswith(".py") and not "robot" in file:
    # set bundle path
    pathname = os.path.dirname(fullpath)
    setBundlePath(pathname)
    print(getBundlePath())
    resetImagePath()

Hope this will be helpful.

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to