Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread RaiMan
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

RaiMan posted a new comment:
... and maybe this:
https://answers.launchpad.net/sikuli/+question/661362

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread RaiMan
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

RaiMan posted a new comment:
You have to somehow add the CLASSPATH inside Eclipse to your projects
run environment.

As far as I remember: Eclipse does not automatically propagate the outside 
(system) environment to the project run environment.
But I do not want to deal with Eclipse.

I am dedicated to the JetBrains products.

BTW: it is not a good idea and not necessary, to have Jython on the
classpath. This is handled by jython itself and by the IDE's .

I started to doc the handling of SikuliX scripts in PyCharm:
http://sikulix-2014.readthedocs.io/en/latest/scenarios.html#scripting-with-intellij-pycharm-and-idea-with-python-plugin

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
 yes, i agreen with you about "works for running scripts in any Jython 
environment with minimum effort and clutter."
 i sure again that i had set 
CLASSPATH=C:\jython2.7.0\jython.jar;D:\Sikuli\sikulixapi.jar;
and this setting is good working in pycharm,it's strange not work in eclipse 
with jython.

in my computer's environment variable,BUT it still show in console:
--
Hello World!Jython
1
Traceback (most recent call last):
  File "D:\eclipse-workspace\Jythonagain\sikuli.py", line 9, in 
from sikuli import *
  File "D:\eclipse-workspace\Jythonagain\sikuli.py", line 16, in 
any = Screen(0)
NameError: name 'Screen' is not defined
--
thanks and sorry for have you time with this little question.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread RaiMan
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

RaiMan posted a new comment:
-- to comment#9:
obviously a possible solution tailored for Eclipse/PyDev

again: the recommended way is one that ALWAYS works for running scripts
in any Jython environment with minimum effort and clutter.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread RaiMan
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

RaiMan posted a new comment:
-- to comment #8:
The recommended solution from comment #6 needs (clearly mentioned)

- have sikulixapi.jar on the Java classpath at runtime

meaning you have to add a 
CLASSPATH=

to the jython interpreter's runtime environment.

this is apparently not the case in comment #8

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
in comment 6,i tried successfully ,is in pycharm。

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:

It is puzzling that when i tried this method with jython interpreter in eclipse 
like:
import org.sikuli.script.SikulixForJython
from sikuli import *

print "Hello World!Jython"
x=1
print x

any = Screen(0)

any.click("1m.png")


the console show:
Traceback (most recent call last):
  File "D:\eclipse-workspace\HelloWorldInJython\jythonhll.py", line 5, in 

import org.sikuli.script.SikulixForJython
ImportError: No module named sikuli

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
i must to add [Add source folder] with 
"C:\\Users\\xie\\AppData\\Roaming\\Sikulix\\Lib"  and[ Add zip/jar/egg] 
sikuliapi.jar for the project,in project->properties 
->PyDev-PYTHONPATH->External Libraries page。
and then write the script like:

from sikuli import *

print "Hello World!Jython"
x=1
print x

any = Screen(0)

any.click("1m.png")


i don't know why it doesn't work in comment 8.
maybe something is wrong?

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
sorry,haha
thank you ,RaiMan,i had tried the scripts that in comment 6,it's work now!
In fact, I did a similar attempt before I did it correctly, maybe I had set up 
a wrong place before.Now i know how to let it work currently!

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread RaiMan
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

RaiMan posted a new comment:
I am sorry to say, that your solution in comment #5 is a possibility, but not 
the recommended way for SikuliX.
So I take the right to hide your comment, so others might not be confused.

Still the recommended way for any Jython environment

- have sikulixapi.jar on the Java classpath at runtime

- at the beginning of your script say:
import org.sikuli.script.SikulixForJython
from sikuli import *

So your "wrong" script would shrink to:

import org.sikuli.script.SikulixForJython
from sikuli import *
print "Hello World!Jython"
x=1
print x
click("1m.png")

... except the first 2 lines the same as in the SikuliX IDE - which was
the goal for the solution.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-11 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

Status: Answered => Solved

xiaocezi confirmed that the question is solved:
now i had achieved to run sikuli scripts in pycharm with jython interpreter.
and achieved to run sikuli scripts in eclipse with jython interpreter, or java 
application.
in pycharm with jython interpreter is easy,can like this:

import sys
sys.path.append("C:\\Users\\xie\\AppData\\Roaming\\Sikulix\\Lib")
from sikuli import *
from sikuli import Screen

print "Hello World!Jython"
x=1
print x

any = Screen(0)
any.click("1m.png")
---

the"C:\\Users\\xie\\AppData\\Roaming\\Sikulix\\Lib" directory,is a auto create 
file directory when i setup sikuli.
 

ok, my english is not so good,if has any question about it,can email
me:xiejia...@126.com

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-12-06 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
thank you very very much,Raiman!
You are a good man!
it is suprise for me!
I'll try this way in the link,and reply weather i work with it.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-11-20 Thread RaiMan
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

Status: Open => Answered

RaiMan proposed the following answer:
https://github.com/RaiMan/SikuliX-2014/wiki/Jython-in-IDEs-like-Eclipse-or-running-it-from-commandline
Might help.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-11-20 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
I've achieved to run SikuliX from Command Line in pycharm with relative 
path,like :
--
import os
os.system("runsikulix.cmd -r MonkeyTest-WindowsSystem")
--
my os is window 7.0.
and i want to know how could i run sikuli code ,like:
--
click(“x.png”)
--
in pycharm with python script,but a sikuli script。 

i am still study in this continue.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-11-20 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

xiaocezi posted a new comment:
i have readed the answer about"How we import sikuli.Sikuli.* module in python"
the page is https://answers.launchpad.net/sikuli/+question/136170
i add path in os environment like:
set JYTHONPATH=c:\Program Files\Sikuli\sikulix.jar\Lib
set CLASSPATH=c:\Program Files\Sikuli\sikulix.jar
set SIKULI="C:\Program Files\Sikuli\sikulix.jar"

but,the sikuli script in jython still not work.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #660917]: how to run a sikuli script in jython.exe or jython IDE

2017-11-20 Thread xiaocezi
Question #660917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660917

Description changed to:
Hi,

  i have a question about "how to run sikuli script in jython.exe or jython 
IDE"
i'm not sure it's whether can be achieved,if could achieve in this way ,please 
let me know how ?
i have worked with sikulix1.1.1 for 2 months and learned a lot.
but still  new for the sikuli and python.
thanks very much.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp