sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #34023
Re: [Question #269941]: Handling several Region.text()
Question #269941 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/269941
Description changed to:
Hi,
i am french, i will try to be as clear as possible.
I have to scan several regions of text and update the program's
variables when a change event occurs in one of these regions.
I use java with sikuli 1.1.0 api.
/*
// init--> region
Region myRegion = new Region(// ... coordinates ...);
// scan --> region
String myVariable = myRegion.text();
// update --> program
myClass.setMyVariable(myVariable)
// set --> region change handler
myRegion.onChange(// ... myClass.setMyVariable(myRegion.text) ...);
// start --> region observer
myRegion.observeInBackground(Constants.FOREVER);
*/
Using this pattern on several regions crash the app (access violation),
apparently tesseract doesn't like multi-threading (observeInBackground).
I could use the while loop to update variables every x seconds in the
main thread but i think it's pretty ugly and bloated.
Is there a workaround to accomplish these things in a better way ? (-->
scan text --> update program --> wait for text region change)
Thanks
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.