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-04-04 Thread Launchpad Janitor
Question #700981 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700981

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

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

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


[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-18 Thread Emmanuel Mbambo
New question #700981 on SikuliX:
https://answers.launchpad.net/sikuli/+question/700981

Hi,

When I was developing my own sekuli automation using both sikulix IDE(I'm using 
IDE to take screenshots) and Java on eclipse, I find a slight problem.

When using a region to find and or read text, sometime the images you want to 
interact with on a website are little bit down on the screen and I would need 
to scroll down for sikuli to find the images. This offsets the region where I 
want to read the text.

For me the solution I found is to zoom-in a little bit for all images to appear 
at once.

With image patterns I can take a screenshot and use offset to click at a 
specific place on an image. Correct me if I'm wrong I think the pattern will 
look for an image on a screen and use the screenshoted image to look for a 
specific place to click on a screen, it does not use a region. Which I think is 
more reliable even when the website is scrolled up and down, as long as the 
image is visible the click function or other supported functions will be 
possible.

This got me thinking and to ask this question.

Is it possible with sikuli to take a screenshot, then within the screenshoted 
image create a rectangle around the text or around where the text will 
appear(if the text is on and off) then read that text as normal? 

The idea is the text will be found even if the page has scrolled up or down as 
long as the image is visible. 


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