Re: [Sikuli-driver] [Question #680605]: Tesseract reads most numbers correctly but not all. how to improve ?

2019-05-07 Thread MP
Question #680605 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680605

MP gave more information on the question:
Maybe I should mention:

I tryed ofc the command 
tr.setVariable(variableKey, variableValue) from your doc before making this 
topic.

Can you show me how you do this for example with saying tessact only to
read numbers ?

Cause the only one I get to work is tr.setPSM(number)

-- 
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 #680605]: Tesseract reads most numbers correctly but not all. how to improve ?

2019-05-07 Thread MP
Question #680605 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680605

Status: Answered => Open

MP is still having a problem:
Hey raiman,, As mentioned in the first post, I read the doc first.
Tr.setDPI(50) for example doesnt work. In the doc there is no answer how the 
syntax then must be.

-- 
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 #680605]: Tesseract reads most numbers correctly but not all. how to improve ?

2019-05-07 Thread MP
Question #680605 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680605

MP gave more information on the question:
https://stackoverflow.com/questions/4944830/how-to-make-tesseract-to-
recognize-only-numbers-when-they-are-mixed-with-letter

1) So I found the settings I need that will solve my problem (i think).

I want that tesseract only uses numbers:

But again I have trouble using the right syntax in sikulix.

tr.setoutputbase digits (not working)

2) Another solution is:

===
 made it a bit different (with tess-two). Maybe it will be useful for somebody.

So you need to initialize first the API.

TessBaseAPI baseApi = new TessBaseAPI();
baseApi.init(datapath, language, ocrEngineMode);

Then set the following variables

baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_LINE);
baseApi.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST, 
"!?@#$%&*()<>_-+=/:;'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
baseApi.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, ".,0123456789");
baseApi.setVariable("classify_bln_numeric_mode", "1");


Yet again I cant seem to get the syntax right. How do I let tesseract
know in sikulix the baseApi commands?

-- 
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 #680605]: Tesseract reads most numbers correctly but not all. how to improve ?

2019-05-03 Thread MP
Question #680605 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680605

Status: Answered => Open

MP is still having a problem:
1.1.4

 r = Region(1059,318,18,17)
 regiononchangecheck = Region(1056,316,342,23)

tr = TextOCR.start()
tr.setPSM(6)

def eventstop(event):
event.stopObserver()
  
regiononchangecheck.onChange(eventstop)
regiononchangecheck.observe(100)


print ("NumberCheck: ") + r.text()


if int(r.text()) == 5:
 print ("0")
 action1 (click, etc)

-- 
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


[Sikuli-driver] [Question #680605]: Tesseract reads most numbers correctly but not all. how to improve ?

2019-05-03 Thread MP
New question #680605 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680605

So I tryed all the PSM setting of Tesseract but with all it still reads the "5" 
as an S, and the "30" as 3 O (so as letters instead of numbers).

NumberCheck: 5
[error] script [ app_part7 ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "X:\Sikulix 
projects\app_part7.sikuli\app_part7.py", line 23, in  if int(r.text()) 
== 0: ValueError: invalid literal for int() with base 10: 'S ' 

the weird part is , in the numbercheck (which I putted there as a check up) he 
reads the number correctly, but once I want to do a certain action with the 
read number, it is like he reads it again but then incorrect...

How can I change the config of Tesseract? I read the doc, but things like 
tr.setdpi(50) dont work...

so my questions:

1) I dont get the syntax how to change different parts of Tesseract 

2) what is the best (read easiest way for a beginner in programming) to read 
those 2 numbers correctly? The numbers are really small like dpi 50 - 70 
something. I read I should scale it to 300? How do I do that? 

3) or is there another solution I am not seeing?


-- 
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 #680253]: Looping infinite with observer

2019-04-16 Thread MP
Question #680253 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680253

MP confirmed that the question is solved:
Thanks RaiMan, that solved my 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 #680253]: Looping infinite with observer

2019-04-15 Thread MP
Question #680253 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680253

Status: Answered => Solved

MP confirmed that the question is solved:
Thank you, I gonna delve more into the syntax of python. It is "easier"
and more "logical" for me then other programming languages. Every day I
start to eat better, sleep better, more happy and less nightmares! ;)

Keep ut the great work you are doing and the amazing support!

-- 
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


[Sikuli-driver] [Question #680253]: Looping infinite with observer

2019-04-14 Thread MP
New question #680253 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680253

Breaking my head again :)
I didnt want to post and find the answer myself, but reading the docs endlessly 
and not getting it, here I am again.

code:
=

r = Region(1059,318,18,17)

tr = TextOCR.start()
tr.setPSM(6)

def eventstop(event):
event.stopObserver()

r.onChange(eventstop)
r.observeInBackground(200)
wait(4)

r.highlight(2)
print r.text() #just to check and compare the number with my own eyes
if int(r.text()) < 18:
print r.text() 
print (" is > 18")

else:
print r.text() 
print (" is < 18")
==


I want to infinite loop my code. so that he checks again after he read the 
previous number.

1) GOTO didnt work :( (I noticed afterwords it doesnt excist in phyton *sad 
face*
2)  wait(IMAGE, FOREVER) 
didnt work, I wanted to do infinite looping while a certain images excised on 
the screen. (I got this from your Desktop Surveillance exercise (I would love 
to see more of those practical examples)
3) I tryed (FOREVER) but still closed
4) I tryed after the IF and Else statement "r.observe()"
thinking that , I can just start the observer again and he starts again from 
the top (which didnt work).
5) I noticed with the following code that aslong he finds it , he is infinite. 
But when he doesnt find it , it closes the script. (which I dont understand 
why) So I assume I have to do something special with the IF, else statement to 
get the infinite loop?

while ("1555266479704.png",FOREVER):

if find("1554910622874.png"):
popup ("YES")

else:
popup ("NO")
 
I cant sleep, I cant eat, getting depression and nightmares of code. So 
hopefully you can help me out :) Thank you!


-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-14 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Solved

MP confirmed that the question is solved:
Thanks RaiMan, that solved my 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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-13 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
 I gonna test and read your post a million times. I understand most
of it now.

so basically you make a start shot outside the change period? And then
you start the observer again and then he compares to the previous shot?
(so that is the check?)

Can you pinpoint precisely where the shot is made before the 4 second
change period in your code? And precisely where the check of the shot is
being made? I am sure I will than 100% understand it :)

=
def handler(event):
event.stopObserver()

regNumber.onChange(handler)
regNumber.observe(100) # a time within that a change should happen
# the script waits here until the handler is called and stops the observation
wait(4) # delay the flashing
newNumber = regNumber.text()
=

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-12 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Solved => Open

MP is still having a problem:
Instead of making a new topic, I want to reopen this one. I found 3 ways
to read the numbers perfectly. xD But with all 3 I hit the wall of
onchange trigger... I read post nr 11 again and again and again (+the
docs on onchange and observe) to understand it. So I gonna try to
explain myself how I understand it and hopefully I will see what I dont
understand yet with your help.

Can you give me a general workflow how to implement the following:

I want to trigger event"read number" 5 seconds (there is a 4 second
flashing animation in between) after an onchange trigger. Does the
onchange event also make a start screenshot? If so, how do I delay it 4
seconds?

=
Onchange(event)
wait(4)
r.oberserve(FOREVER) #I want to trigger the onchange event every single time 
there is a change, so infinite loop)
=


workflow:

old number
start flashing new number
Trigger onchange
after trigger onchange make a screenshot after 4 seconds
new number not flashing anymore
Trigger event read OCR number
do action with new number

I am so close to seeing it, I would be damned to give up now :D

-- 
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 #680194]: OCR number reading works but how to put in conditions?

2019-04-11 Thread MP
Question #680194 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680194

Status: Answered => Solved

MP confirmed that the question is solved:
I am such an idiot - _ - Yes you are right, I need a break. haha 
Thank you for your patience. I am happy with my progress so far.

-- 
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 #680194]: OCR number reading works but how to put in conditions?

2019-04-11 Thread MP
Question #680194 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680194

MP gave more information on the question:
My print result from the previous code in #2 is:

1


2

-- 
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 #680194]: OCR number reading works but how to put in conditions?

2019-04-11 Thread MP
Question #680194 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680194

Status: Answered => Open

MP is still having a problem:
Ah yes silly me, I am learning python and sikulix at the same time. It
is going pretty well imo. :)


tr = TextOCR.start()
tr.setPSM(6)
r = Region(1056,315,26,26)
OCRnumber = r.text()

print OCRnumber #just to check and compare the number with my own eyes

if OCRnumber == 1:
print 1
else:
print 2

===

I always get 2 as a result. Does this mean the text() is not an integer?
I dont understand why he doesnt print 1. The OCRnumber is the number 1

-- 
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


[Sikuli-driver] [Question #680194]: OCR number reading works but how to put in conditions?

2019-04-11 Thread MP
New question #680194 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680194

So I am really happy my script works and is reading numbers perfectly. I tested 
this with "print region.text()". But now I want that if he reads a "1" that he 
does action 1. I tried the following code but I get the following error:

[error] script [ test_OCR ] stopped with error in line 6 at column 10
[error] SyntaxError ( "mismatched input '=' expecting COLON", )

code:
==
tr = TextOCR.start()
tr.setPSM(6)
r = Region(Region(1056,315,26,26))

if r.text() = "1":  
print "action 1"
else:
print "nothing" 
=

Cheers!

-- 
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 #680188]: match() if not found what value does it give?

2019-04-11 Thread MP
Question #680188 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680188

Status: Answered => Solved

MP confirmed that the question is solved:
Thanks RaiMan, that solved my 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


[Sikuli-driver] [Question #680188]: match() if not found what value does it give?

2019-04-11 Thread MP
New question #680188 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680188

In the code below I am learning the basics. But I cant seem to give a "not 
found" popup when he didnt find the image.

1) what is wrong in the code to give a not found popup?
2) what is the value the find gives if he doesnt find anything?

code:
===
m = find("IMAGE")
if m.exists:

popup ("FOUND")
m.highlight()
wait (2)
m.highlight()
print ("FOUND")


else:

popup ("NOT FOUND")
===

thx :)

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-11 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Solved

MP confirmed that the question is solved:
I only want to read info from the screen, I dont use any keystrokes or
mouse strokes on the website itself with a bot.

I gonna practice more basic exercises till I understand sikulix and
python better. You will see me a lot on this forum :p

 Thank you for all the help so far!

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-10 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
Thx again, I am just trying to grasp it. Which is not easy. I will
practice a bit more and yes, I gonna stay on my workflow step by step. I
tend to go all over the place.

The number case is on https://livecasino.betway.com/lobby

You need an account I think, after that click "live betaway roulette".
With your expertise maybe you can guide me in a direction I didnt see
yet.

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-10 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
1) "at beginning of handler just wait 3 seconds and then make your
compare/find logic on event.getRegion()." Well isnt this the part that
just doesnt work? I tryed it with the next code. Did I do something
wrong? It still gives me the double notification+ 2 times the red border
when tested on animation that lasted 3 seconds.


def changed(event):
wait(3)
print "something changed in ", event.region
for ch in event.getChanges():
ch.highlight() # highlight all changes
wait(1)
for ch in event.getChanges():
ch.highlight() # turn off the highlights

Settings.ObserveScanRate = 0.2

r = Region(Region(1056,314,27,27))
# any change in r larger than 50 pixels would trigger the changed function
r.onChange(50, changed)

# another way to observe for 30 seconds
r.observeInBackground();wait(FOREVER)
=


2) findAny(), I cant find it in your documentation. Can you show me simple 
example with observer, region and get any ? For example I have IMAGE1, IMAGE2, 
IMAGE3 and I want to match the appearing number. When it matches with IMAGES1 
=> print "image1 appeared!", etc

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-10 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

MP gave more information on the question:
Cause as mentioned in number one, it just doesnt work, even with a wait
6 , he still ignore the wait 6 and just makes an instant observe start
shot. (just trying to fully grasp it and understand 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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-10 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
I now understand better the mechanics behind it.

" - at observestart a shot of the region is taken"

1) I want that shot is being taken after 3 seconds after the onchange
trigger. Is that possible?

2) I want to infinite let the observer be active, so that the onchange
event can trigger when there is a change (or am I understanding it not
clearly?)

My global idea:

I want to infinite observe the tiny region where a new number appears.
Then take a shot after 3 seconds when the new number appears. When it
does: I want to compare it with a grafic number I stored. He compares it
and does a certain action that is programmed with each number. rinse and
repeat. :)

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-10 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
I tested a lot this morning. And I also used your icon. With the icon
and other tests I conclude that the code works when 1 frame, screen
change happens.

But from the moment there is an animation (so more frames changes in a certain 
time) it gives the double onchange effect. You can easy try my test: use the 
code:
==
def changed(event):

print "something changed in ", event.region
for ch in event.getChanges():
ch.highlight() # highlight all changes
wait(1)
for ch in event.getChanges():
ch.highlight() # turn off the highlights
event.repeat(6)

r = Region(Region(614,711,729,60))
# any change in r larger than 50 pixels would trigger the changed function
r.onChange(300, changed)
wait(6)
# another way to observe for 30 seconds

r.observeInBackground();wait(FOREVER)
==
, make the whole screen the region, play a you tube vid for 3 seconds. Then 
stop it. The timer in this code is put on 6 repeat and 6 wait. So it should 
only give 1 onchange effect, but it gives 2.

Hopefully this helps

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-09 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

MP gave more information on the question:
Even scrolling down this page (had my code on by accident) and I slide
(slowly!) through a grey line of the website and end up in a white part.
He still does the same behavior, giving me 2 notifications. :)

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-09 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Needs information => Open

MP gave more information on the question:
Hey, you gave me the idea to test my code on more things. If you just go
on you tube, start my code and play something for 3 seconds then stop.
He will do the exact same behavior and give me 2 onchange notifications.

Thx again for the support! I really wonder what the solution will be. :)

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-09 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
Hey thx for the amazing support. I will stay here with my questions! I
will be surely donating. :)

I tryed the wait 2 at the place you told me. But even with wait 10 + 
event.repeat(10) he STILL does it 2 times - _ -
The repeat just repeats after the inserted seconds... so after 4 seconds the 
event runs again with the red borders. (it feels like it is ignoring the 
condition of the onchange)

When a new number comes, it flashes a bit for 2 - 3 seconds. So I would
assume a wait of 4 - 5 would fix this problem. Cause maybe he takes a
screenshot of the flashing , so meaning after X amount of seconds he
compares the flashing color one with the final color one and gives me a
wrong onchange event.

But it still gives me twice a notification that 2 changes happened. :(
(+ 2 times the red borders) (I use the red borders and the print command
as a debug tool for testing the onchange command.)

I feel I am close but man, it is not easy :)

-- 
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 #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-09 Thread MP
Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

Status: Answered => Open

MP is still having a problem:
He is still giving me twice a red border indicating changes on that
location. But I think I know the problem: I need to delay the screenshot
making of the onchange event by 2 seconds.  After that he can make a
screenshot of that location.

I tryed to type "wait 2" in the event but didnt work. So I assume you
have to put the delay somewhere at the observe event ?

def changed(event):

wait(2)
print "something changed in ", event.region
for ch in event.getChanges():
ch.highlight() # highlight all changes
wait(2)
for ch in event.getChanges():
ch.highlight() # turn off the highlights

event.repeat(5)

r = Region(Region(1056,312,26,30))
# any change in r larger than 50 pixels would trigger the changed function
r.onChange(50, changed)
# another way to observe for 30 seconds

r.observeInBackground();wait(FOREVER)

-- 
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


[Sikuli-driver] [Question #680137]: repeat([waitTime]) how is this syntax with a region onchange?

2019-04-09 Thread MP
New question #680137 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680137

So I am fiddling along, reading the docs and getting a better understanding of 
the commands. Yet what I do miss are basic simple examples to show the 
structure and syntax of the different commands.

I got the following code: (which works)

def changed(event):


print "something changed in ", event.region
for ch in event.getChanges():
ch.highlight() # highlight all changes
wait(1)
for ch in event.getChanges():
ch.highlight() # turn off the highlights

r = Region(Region(1058,316,22,23))
# any change in r larger than 250 pixels would trigger the changed function
r.onChange(250, changed)
# another way to observe infinite

r.observeInBackground();wait(FOREVER)

===

The problem is dat the change event picks up a single change 2 or 3 times 
within a second. I want to delay it by 4 seconds. That way I am sure that the 
change only counts for 1 change in 4 seconds.

I looked up the command in the docs:

 repeat([waitTime])

I tryed several places where to put it but it doesnt delay the event. I assume 
I got some syntax wrong... there is no clear example using this. Anyone can 
help me? 

Cheers

-- 
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 #680112]: 1.1.4 no toolbar on the left?

2019-04-08 Thread MP
Question #680112 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680112

Status: Answered => Solved

MP confirmed that the question is solved:
>From a beginner point of view the command bar is far from useless. I
love to see the possible commands that I can use when I am a beginner. I
also like the auto generating of the code which saves a lot of time. It
gives me insight fast in the possibilities and practicality. Is there an
overview somewhere with the most (fundamental and useful) commands?

and thx!

P.S. What do you mean with "scanning" is this a command for screen
reading of images?

-- 
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 #680112]: 1.1.4 no toolbar on the left?

2019-04-08 Thread MP
Question #680112 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680112

Status: Answered => Open

MP is still having a problem:
Thx for the answer! Yes, the terminating works. I did something wrong.
And to bad that toolbar is gone. I stay with 1.1.3 atm till I get
better.

Thing is, the main perpose I wanna use this software is for reading
number images. So I want to use some kind of OCR language for it. Is it
better to use 1.1.4 ? I read on your website something about onchange
command.

You see a row of numbers as images (so each number is an image. And each
time a new number is added (and the last number is gone). and with each
number an action is performed. This is what I wanna realize in the end
:)

-- 
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


[Sikuli-driver] [Question #680112]: 1.1.4 no toolbar on the left?

2019-04-08 Thread MP
New question #680112 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680112

1) Because 1.1.4 wasnt working for me before, I used 1.1.3. As a total beginner 
in this programming environment I loved the tool bar on the left side of the 
screen. But it isnt there in 1.1.4 ??? 

2) Also in 1.1.4 the key combination shift + alt + C to terminate running 
scripts is no more? (I use it all the time in 1.1.3 cause my code is faulty a 
lot of times)

So if there is no solution for these 2 problems I am facing, I just gonna 
return to 1.1.3 :)

-- 
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 #679803]: Latest sikulix installer does nothing when double clicked

2019-04-08 Thread MP
Question #679803 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679803

MP confirmed that the question is solved:
Thanks RaiMan, that solved my 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 #679803]: Latest sikulix installer does nothing when double clicked

2019-04-08 Thread MP
Question #679803 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679803

Status: Answered => Solved

MP confirmed that the question is solved:
Thank you! That was the problem! It has to be 64 bit java version!

It works lovely now! thx again!

-- 
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 #679803]: Latest sikulix installer does nothing when double clicked

2019-04-07 Thread MP
Question #679803 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679803

Status: Answered => Open

MP is still having a problem:
Please look at t he link, the picture shows you the error I am getting.
There is nothing wrong with the path Rofl, does none read topics?
-_-

-- 
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 #679803]: Latest sikulix installer does nothing when double clicked

2019-04-06 Thread MP
Question #679803 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679803

Status: Answered => Open

MP is still having a problem:
Did you even read my topic? I have 64bit AND java installed

-- 
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 #679803]: Latest sikulix installer does nothing when double clicked

2019-04-06 Thread MP
Question #679803 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679803

MP posted a new comment:
Did you even read my topic? I have 64bit AND java installed

-- 
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 #679803]: Latest sikulix installer does nothing when double clicked

2019-04-06 Thread MP
Question #679803 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679803

MP gave more information on the question:
I tryed the command line
java -jar path-to/sikulix.jar

But then I get the next error message:

https://ibb.co/L161L5K

-- 
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


[Sikuli-driver] [Question #679803]: Latest sikulix installer does nothing when double clicked

2019-04-06 Thread MP
New question #679803 on Sikuli:
https://answers.launchpad.net/sikuli/+question/679803

preq: installed latest JAva / phython

Double clicking the jar file doesnt do anything...
So I was forced to install 1.1.3 which works like normal.

Using win 10 64bit

Any help would be cool! 

Thx!

-- 
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