sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #24646
[Question #245130]: Can't use time in Observe
New question #245130 on Sikuli:
https://answers.launchpad.net/sikuli/+question/245130
Hi,
Im using Sikuli IDE 1.0.1
with java 1.7.0.51
I always get error when using observe for some time...
It stops the script and won't continue.
And I don't want to use FOREVER if i don't have to.
Code:
*****************************************************
def xxx(event):
event.region.stopObserver()
onAppear(click(P), xxx)
observe(50)
*****************************************************
I get this ERROR:
[error] script [ proba ] stopped with error in line 23
[error] java.lang.ClassCastException ( java.lang.ClassCastException: java.lang.Integer cannot be cast to org.sikuli.script.Pattern )
Can't find solution to avoid this error..
If i put
onAppear(click(P), xxx)
observe(50, background=True)
Script contiunes and finishes everything after that..
but still get error, but this one is not stoping script..
ERROR:
Exception in thread "Thread-12" java.lang.ClassCastException: java.lang.Integer cannot be cast to org.sikuli.script.Pattern
at org.sikuli.script.SikuliEventManager.checkPatterns(SikuliEventManager.java:125)
at org.sikuli.script.SikuliEventManager.update(SikuliEventManager.java:275)
at org.sikuli.script.Region.observe(Region.java:2062)
at org.sikuli.script.Region$ObserverThread.run(Region.java:2105)
at java.lang.Thread.run(Unknown Source)
How to get rid of this, or what is the workaround (except if exists...)
and what does Background = True does??
p.s. I'm new in this and I hope I didn't do smthng wrong :)
Regards,
Nikola
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.