← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #193849]: [EXAMPLE] XBMCFlix-o-mate Automating Netflix Silverlight Controls

 

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

RaiMan posted a new comment:
a) There is always some research necessary, to get some structure into the window titles. But that is the easiest approach on Windows.
If you know the part of the window title, that selects it among others:
app = App("exclusive part of window title")
reg = app.window()

if more than one window contains the text:
app = App("exclusive part of window title")
for n in range(100): 
    win = app.window(n)
    if not win: break
    # here we can check some aspects of the window,
    # to find out the right one
    # position, dimension, content

this all does not do any focus action.

b) yes

c) The coordinate system is based on how Java is handling multi monitor stuff:
- primary monitor: (0,0) top left (w1 x h1)
- secondary monitor:
 e.g. if positioned right of primary in the system settings, its top left coordinates are (w1, 0)
 e.g. if positioned left of primary in the system settings, its top left coordinates are (-w1, 0)
 e.g. if positioned above of primary in the system settings, its top left coordinates are (0, -h1)

and so on.

So if you know your monitor setup, you can say (second example):
reg = Region(-1000, 400, 100, 100)
and reg is a region somewhere on the second monitor.
This systematic is used with Matches and Locations too.

The Screen class itself is only an extension of the Region class, with
some special aspects with respect to the physical monitor and the
convenience, that in the IDE (Python level) you do not need to qualify
the methods with a screen object, if you target the primary screen.

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