← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #632493]: obout Capture

 

Question #632493 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/632493

    Status: Open => Answered

RaiMan proposed the following answer:
in Sikuli(X) up to version 1.x it is not recommended to use the Java
notation like scr.capture(), since internally all non-dotted methods are
automatically bound to the object SCREEN, which is initialized as
Screen(0).

So for version 1.1.x (recommended in any case) this works as expected:
scr_name = capture(...whatever allowed...)

so your snippet should read:
from sikuli import * # only needed in imported files or with plain Jython
# create .png screenshot file in %TEMP% dir
scr_name = capture(SCREEN)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.