← Back to team overview

sikuli-driver team mailing list archive

[Question #262805]: Switching Regoins

 

New question #262805 on Sikuli:
https://answers.launchpad.net/sikuli/+question/262805

This is a bit complicated.

In my program, I'm trying to look at three cards. 
One card have a C another has a UC and another has a R.

I did a find all, to get all of the cards.

I did this to get all of the sizes of the cards:
        	Rectangle left_side_size = new Rectangle(left_most_button.getX(),left_most_button.getY()
        			,left_most_button.getW(),left_most_button.getH()*2);
        	Rectangle right_side_size = new Rectangle(right_most_button.getX(),right_most_button.getY()
        			,right_most_button.getW(),right_most_button.getH()*2);
        	Rectangle middle_size = new Rectangle(middle_Button.getX(),
        			middle_Button.getY()
        			,middle_Button.getW(),middle_Button.getH()*2);
			System.out.println("setting sizes");

I did this to verify the sizes are good:
        	TakeScreenShot m_screenie = new TakeScreenShot(left_side_size);
        	m_screenie.shot("left");
        	TakeScreenShot m_screenie2 = new TakeScreenShot(right_side_size);
        	m_screenie2.shot("right");
        	TakeScreenShot m_screenie3 = new TakeScreenShot(middle_size);
        	m_screenie3.shot("middle");

My screenshots are correct.
I do this to set the new region.
            	if (current_card_count == 0)
            		s.setROI(left_side_size);
            	if (current_card_count == 1)
            		s.setROI(right_side_size);
            	if (current_card_count == 2)
            		s.setROI(middle_size);

I tried set rect as well, but that didn't seem to work.

My goal is to start off with the most powerful card first, so I need to scan each card. Next, I need to compare each one to see which is the most powerful.  I think I have the code right, but nothing is happening.

Let me know if you have any questions or comments.



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.