Re: [Sikuli-driver] [Question #700981]: Is it possible with sikuli to take a screenshot, within the screenshoted image create a rectangle around the text then read that text or text?

2022-03-19 Thread Emmanuel Mbambo
Question #700981 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700981

Status: Answered => Open

Emmanuel Mbambo is still having a problem:

In java do you call regionOfImage as a pattern then find the region within the 
image methods available?

Pattern p = new Pattern("someImage.png"); 
Region mainImage = find("p);
int w = mainImage.getWidth();
int h = mainImage.getHeight();
Region textRegion = new Region(w/4,h/4,w/2,h/2);

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #700981]: Is it possible with sikuli to take a screenshot, within the screenshoted image create a rectangle around the text then read that text or text?

2022-03-19 Thread Emmanuel Mbambo
Question #700981 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700981

Emmanuel Mbambo posted a new comment:

In java do you call regionOfImage as a pattern then find the region within the 
image methods available?

Pattern regionOfImage = new Pattern("someImage");
regionOfImage.similar((float) 0.7);

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #700787]: focus application based on pid

2022-03-19 Thread RaiMan
Question #700787 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700787

Status: Expired => Answered

RaiMan changed the question status:
2.0.6 will have 
app = App.withPID(pid)

if valid, then app can be used normally.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #700981]: Is it possible with sikuli to take a screenshot, within the screenshoted image create a rectangle around the text then read that text or text?

2022-03-19 Thread RaiMan
Question #700981 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700981

Status: Open => Answered

RaiMan proposed the following answer:
if I understand right:

regionOfImage = find(someImage)

now you want to read the text in some smaller region inside the found
image?

You can calculate the new region based on the (x, y) of the given
region:

newX = regionOfImage.x + xOff
newY = regionOfImage.y + yOff
textRegion = Region(newX, newY, w, h)

xOff, yOff, w, h have to be given or calculated before.

There are also some functions to define a new region based on a given one:
https://sikulix-2014.readthedocs.io/en/latest/region.html#extend-regions-and-create-new-regions-based-on-existing-regions

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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