sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #21190
[Question #236034]: NameError: global name 'Rectangle' is not defined
New question #236034 on Sikuli:
https://answers.launchpad.net/sikuli/+question/236034
Hi,
I encountered with an issue taking the screenshot, running my script in Sikuli 1.0.1 August 12th release. This used to work in Sikuli rc3. I'm running the script via command line. While coding in Eclipse, I'm getting the createScreenCapture, Rectangle, etc in the autocomplete list as well. Is this a bug with Sikuli 1.0.1, any workarounds pls ..
Code Snippet->
---------------------------------
from java.awt import Robot
from java.awt import Toolkit
from java.io import File
from javax.imageio import ImageIO
from java.awt.image import BufferedImage
robot = Robot()
theImage = robot.createScreenCapture(Rectangle(268,187,738,510))
---------------------------------
Error Message->
---------------------------------
image = robot.createScreenCapture(Rectangle(268,187,738,510))
NameError: global name 'Rectangle' is not defined
---------------------------------
Thanks.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.