← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #238920]: Is there any way to create a copy of a Screen object?

 

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

    Status: Needs information => Answered

RaiMan proposed the following answer:
it does not make sense, to make a copy of a screen object.
A screen object does not remember anything, that needs a deep copy.

but if you need it for whatever reason, just use
s1 = Screen(n)

where n is a valid screen number (giving an invalid number will silently return Screen(0)).
This will give y a new object.

If you do not know the number and want to replicate an existing screen object:
s1 = Screen(s.getScreen().getID())

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