[Sikuli-driver] [Question #194102]: button matrix

2012-04-19 Thread Mic Cross
New question #194102 on Sikuli:
https://answers.launchpad.net/sikuli/+question/194102

Just started sikula tonight so total newbie ... the gui is a matrix of small 
square buttons 20 by 10 . do I need to try and capture every one, or can I 
capture the block and somehow interpolate inside with x = topLeft + 
(btnCount*5) etc? tia

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #194102]: button matrix

2012-04-19 Thread Mic Cross
Question #194102 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194102

Description changed to:
Just started sikula tonight so total newbie ... the gui is a matrix of
small square buttons 20 by 10 . do I need to try and capture every
one, or can I capture the block and somehow interpolate inside with x =
topLeft + (btnCount*5) etc? tia

  the gui is like a spreadsheet of tiny buttons ... looking at
region and pattern - am I getting warm? :-) tia

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #194102]: button matrix

2012-04-19 Thread Roman Podolyan
Question #194102 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194102

Status: Open = Answered

Roman Podolyan proposed the following answer:
Errr... what you mean by 'capture' here?

If you want to click the buttons, and the button matrix is static, all
buttons have same width and same height, of course, you can build a
function which captures one top left button, gets some zero
coordinates out of its position, and then returns coordinates for
screen Click from button row/column number.

You need just build that function measuring single button length and
interval between two buttons.

It would look like:

x = topleft_button_center_x + (column - 1) * (button_width  + 
horizontal_interval_between_buttons) 
y = topleft_button_center_y + (row - 1) * (button_height + 
vertical_interval_between_buttons)


Is that - coordinates for clicking - what you want?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #194102]: button matrix

2012-04-19 Thread j
Question #194102 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194102

j posted a new comment:
You can capture all buttons at once or you can capture each button
explicitly. What works better for you depends on your GUI.

You can use the method of capturing the whole GUI and then calculate the 
clickpoint-coordinates if
- the buttons (almost) never move or change in size (or you'll have to 
recalculate and retake the screenshot)
- the buttons are very simmilar to each other (so that image recognition is not 
able to find the right image every time)
You should use one image for every button if 
- The buttons move inside of the GUI or other elements of the GUI can change 
(so that the all-button-image would not be found)
- The look/size of some buttons can change (and would need a recalculation of 
the clickpoint-coordinates)

I guess the script that uses only one big image would be faster than
searching for each button, but it depends on the fact that you never
change the button positions.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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