Re: [Sikuli-driver] [Question #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2021-03-03 Thread Chetan
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Chetan posted a new comment:
Hi
is this bug fixed and avialable in 2.0.5?

-- 
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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-28 Thread Shane Paes
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Shane Paes posted a new comment:
Hi @RaiMan
Thanks for the above code. it fixed my problem... 

I will create this as a bug for findText() or find("some 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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-28 Thread Shane Paes
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Status: Answered => Solved

Shane Paes 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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-28 Thread Shane Paes
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Linked to bug: #1881240
https://bugs.launchpad.net/bugs/1881240
"findText() or find("some text") not working with Sikuli 2.0.4"

-- 
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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-28 Thread Shane Paes
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Shane Paes posted a new comment:
Hi @RaiMan
Thanks for the above code. it fixed my problem... 

I will create this as a bug for findText() or find("some 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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-28 Thread Shane Paes
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Shane Paes posted a new comment:
Hi RaiMan,
I have tried the above code. It looks promising. 
I will continue with more tests.

In the meanwhile for the fix in 2.0.5 release how are you planning to
track the findText() or find("some text") fix?

Do you plan to create a bug for 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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-27 Thread Shane Paes
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Shane Paes posted a new comment:
ok Thanks RaiMan, will give this a try and let you know my observations.

-- 
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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-27 Thread RaiMan
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Status: Open => Answered

RaiMan proposed the following answer:
I am sorry for the delay - should have gone deeper into the SikuliX 
implementation from the beginning.
findText() or find("some text") are simply based on a "stupid" implementation 
(my bad ;-).
I will improve it with the 2.0.5.

Until then try to solve your problem with findWord, findWords, findLine
and findLines features.

Here a Java sample:

  Region region = new Region(0, 0, 300, 300);
  try {
String fImg = new File("testImage/image").getCanonicalPath();
Match match = region.find(fImg);
List lines = match.findLines();
for (Match m : lines) {
  System.out.println(m.getText());
}
match.findLine("API").highlight(2);
List words = match.findWords();
for (Match m : words) {
  System.out.println(m.getText());
}
match.findWord("API").highlight(2);
  } catch (Exception e) {
System.out.println("Error" + e.getMessage());
  }

a "line" in this sense is a row of text in the image, that is seen by Tesseract 
as a line (same background color, same base line, ...).
a "word" is some text of characters surrounded by non-text (like white space).

-- 
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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-27 Thread RaiMan
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Description changed to:
 current state
findText() and find("some text") are supported by the same implementation, 
which currently does not work well.
This is a bug and will be fixed in 2.0.5

Until then try to solve your problem until with findWord, findWords,
findLine and findLines features

**

This is my code

Settings.OcrTextRead = true;
Settings.OcrTextSearch = true;

Region RegionShapeMarkup = new Region(4,4,269,165);
String TextBoxLabelName= "Shape";
Match TextBoxLabelNameFound = RegionShapeMarkup.find(TextBoxLabelName);
if (TextBoxLabelNameFound != null)
{
RegionShapeMarkup.click (TextBoxLabelNameFound.offset(0, -30));
}

the script fails with error
FindFailed: Shape.png: (0x0) in R[4,4 269x165]@S(0)

even though searching for text, script fails with error shape.png not
found.

Test environment:
Windows 10 64bit, JAVA11

Any help on this issue will be appreciated.

-- 
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 #690954]: [2.0.4] findText("string") not working --- try with findWord, findWords, findLine, findLines

2020-05-27 Thread RaiMan
Question #690954 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690954

Summary changed to:
[2.0.4] findText("string") not working  --- try with findWord, findWords, 
findLine, findLines

Description changed to:
 current state
findText() and find("some text") are supported by the same implementation, 
which currently does not work well.
This is a bug and will be fixed in 2.0.5

Try to solve your problem until then try with findWord, findWords,
findLine and findLines features

**

This is my code

Settings.OcrTextRead = true;
Settings.OcrTextSearch = true;

Region RegionShapeMarkup = new Region(4,4,269,165);
String TextBoxLabelName= "Shape";
Match TextBoxLabelNameFound = RegionShapeMarkup.find(TextBoxLabelName);
if (TextBoxLabelNameFound != null)
{
RegionShapeMarkup.click (TextBoxLabelNameFound.offset(0, -30));
}

the script fails with error
FindFailed: Shape.png: (0x0) in R[4,4 269x165]@S(0)

even though searching for text, script fails with error shape.png not
found.

Test environment:
Windows 10 64bit, JAVA11

Any help on this issue will be appreciated.

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