← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #173996]: Plans for dual screen support?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Sikuli supports multi screen environments 
(see docs: http://sikuli.org/docx/screen.html#multi-monitor-environments)

But currently you have to tell Sikuli, on which of the screens it should
search.

If you do not specify a search region (e.g. find(some-image)) the
primary screen will be searched.

So, if you know, something happens on Screen(1), you have to specify:
(best is to assign Screen(1) once: SCR1 = Screen(1))
SCR1.find(some-image-on-screen1)

If you have an app (like chrome), you might use the App class functions,
to find out, where your app window is located:

aChrome = App("Chrome") # to be adapted for Windows
aChrome.focus()
SCR1 = aChrome.window().getScreen()

or you decide to work directly with the app window:

aChrome = App("Chrome") # to be adapted for Windows
aChrome.focus()
aChromeWin = aChrome.window()
with aChromeWin:
    find(some-image-in-chrome-window)
    # more actions inside Chrome window

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