Re: [Sikuli-driver] [Question #692511]: project extending SikuliX functionality

2020-08-24 Thread Kinga Wierchomska
Question #692511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692511

Status: Answered => Open

Kinga Wierchomska is still having a problem:
Thank you for your answer, but I've had something different in my mind.
I want to create my own Java classes and use its methods in IDE without
creating instances of this classes in scripts  (methods like click, wait
etc. works that way in sikulix IDE). How can I achieve that?

-- 
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 #692562]: When and where Sikuli.py file is being run by Sikulix

2020-08-24 Thread Kinga Wierchomska
New question #692562 on Sikuli:
https://answers.launchpad.net/sikuli/+question/692562

I am trying to find where and when file named Sikuli.py in Lib/sikuli directory 
in SikuliXAPI is being run. Thank u in advance.

-- 
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 #692562]: When and where Sikuli.py file is being run by Sikulix

2020-08-24 Thread RaiMan
Question #692562 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692562

Status: Open => Answered

RaiMan proposed the following answer:
Ok, you are digging around ;-)
... just on the way to answer your other question.

Sikuli.py is executed every time, when an

from sikuli import *

is issued

This is done internally in the IDE for main scripts automatically (run is 
triggered in the IDE via run button), before running the script.
Other scripts, that are imported at runtime and use SikuliX features, must have 
a 
from sikuli import *
usually at the top of the script.

... and now wait for my answer on your other 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 #692511]: project extending SikuliX functionality

2020-08-24 Thread RaiMan
Question #692511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692511

Status: Open => Answered

RaiMan proposed the following answer:
Ok, understood.

Then as a base you have to do everything like mentioned above.

To use your defined functions undotted like click(), ... they have to be added 
to the globals inventory.
This is a dynamic process at runtime.

How this is done in SikuliX can be found in Sikuli.py, which is triggered at 
runtime by a
from sikuli import *

before a script is executed (automatically for main scripts, added into
imported scripts)

The top function is
use()

which defines the global constant SCREEN object.

use() then internally calls 
_exposeAllMethods(...)

which does the registering of the class Screen methods.

... but you will not get what you want without at least one import at
the top of all your scripts.

-- 
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 #692511]: project extending SikuliX functionality

2020-08-24 Thread Kinga Wierchomska
Question #692511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692511

Status: Answered => Open

Kinga Wierchomska is still having a problem:
Does this mean that I need to create my own python script which is
basically the same as Sikuli.py and import it in my scripts written in
IDE?

-- 
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 #692511]: project extending SikuliX functionality

2020-08-24 Thread RaiMan
Question #692511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692511

Status: Open => Answered

RaiMan proposed the following answer:
not really.

your mySikuli.py only must contain your extending classes/methods and
your version of __exposeAllMethods(...), that registers your methods
globally, that are intended to be used undotted.

In a main script you then need at the top:
from mySikuli import *

and in imported script it must be
from sikuli import *
from mySikuli import *

Sikuli.py actually cannot be modified, because it is replaced with a
fish copy from the jar with every start of the IDE.

-- 
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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible

2020-08-24 Thread RaiMan
Question #692550 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692550

Linked to bug: #1892161
https://bugs.launchpad.net/bugs/1892161
"IDE crash when OCR does not find anything. Only 272 unsuccessful calls of 
text()  possible"

-- 
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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible

2020-08-24 Thread RaiMan
Question #692550 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692550

Status: Open => Answered

RaiMan proposed the following answer:
ok, sorry for the mess.

I will check.

-- 
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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible

2020-08-24 Thread RaiMan
Question #692550 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692550

RaiMan proposed the following answer:
I made the test and can confirm: at the beginning running the snippet
from inside the IDE I had the problem (at about 300+).

Then after repeating the test (running the script with -r), I could not
reproduce it again.

Even not when running the script from inside the IDE again.

Watching the memory consumption in parallel, I could see, that the usage
constantly increases (which is normal), but also that the GC (Java
garbage collection) works as it should: cutting down the usage from time
to time.

So I guess, that it is one of those ugly memory related problems, that
are very hard to tackle.

... but I'll do my very best.

meanwhile you might try this:
https://github.com/RaiMan/SikuliX1/issues/323

-- 
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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible

2020-08-24 Thread RaiMan
Question #692550 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692550

RaiMan proposed the following answer:
... and this is my latest test showing memory usage:

Reg=Region(1400+0,675,365,51)
Reg.highlight(2)

import java.lang.Runtime as RT
jrt = RT.getRuntime()
print "max:", jrt.maxMemory(), "tot:", jrt.totalMemory(), "free:", 
jrt.freeMemory()

for i in range(1,2000):
Reg.text()
if i % 50 == 0:
print i, "free:", int(jrt.freeMemory()/(1024 * 1024)) 

One can see, when GC does its job.

-- 
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 #692569]: Sikuli says empty page when reading text

2020-08-24 Thread julien abou fadel
New question #692569 on Sikuli:
https://answers.launchpad.net/sikuli/+question/692569

I set up sikuli api on java eclipse then installed tesseract now I select a 
region and tell sikuli to read it but it says empty page tried to search the 
internet it says psm need to be set to 8 but i dont know how 
anyone can help fix i am trying to read sequence of letters on white background 
and letters are either red or black

-- 
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 #692569]: Sikuli says empty page when reading text

2020-08-24 Thread julien abou fadel
Question #692569 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692569

julien abou fadel gave more information on the question:
Edit the psm needs to be set to 10 ( single character per image ) but i
dont know how to set it in 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 #692503]: Custom image path for 1 function

2020-08-24 Thread xyz_User
Question #692503 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692503

Status: Solved => Open

xyz_User is still having a problem:
Strange if i set any other directory i get:

[error] Image: Image not valid, but TextSearch is switched off!

-- 
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 #692511]: project extending SikuliX functionality

2020-08-24 Thread Kinga Wierchomska
Question #692511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692511

Status: Answered => Open

Kinga Wierchomska is still having a problem:
And one more question - do I need to add sikulix IDE to my project as
dependency?

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