Public bug reported: Calling setROI(smaller_region) changes the global variable SCREEN, which I assume is meant to be constant. The __str__ function of SCREEN also isn't updated to reflect the change.
print SCREEN print SCREEN.getW() setROI(Region(0,0,100,100) print SCREEN print SCREEN.getW() setROI(SCREEN) This prints out the following, and at the end the ROI is not updated to the entire screen: Screen(0)[0,0 1440x900] E:Y, T:3.0 1440 Screen(0)[0,0 1440x900] E:Y, T:3.0 100 We can save the original parameters of SCREEN to a variable to get around this, but it took a while to figure out what was happening. 1. X 1.0 rc2 2. 64 bit Mac OSX 10.6 ** Affects: sikuli Importance: Undecided Status: New -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/729260 Title: setROI updates the constant variable SCREEN Status in Sikuli: New Bug description: Calling setROI(smaller_region) changes the global variable SCREEN, which I assume is meant to be constant. The __str__ function of SCREEN also isn't updated to reflect the change. print SCREEN print SCREEN.getW() setROI(Region(0,0,100,100) print SCREEN print SCREEN.getW() setROI(SCREEN) This prints out the following, and at the end the ROI is not updated to the entire screen: Screen(0)[0,0 1440x900] E:Y, T:3.0 1440 Screen(0)[0,0 1440x900] E:Y, T:3.0 100 We can save the original parameters of SCREEN to a variable to get around this, but it took a while to figure out what was happening. 1. X 1.0 rc2 2. 64 bit Mac OSX 10.6 _______________________________________________ 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