← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #171026]: How to get screen resolution?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
What you need, is currently not available as a feature of Sikuli.

It seems, you have already checked each trick, to get the information
from Windows.

I think, telling the Sikuli script with a parameter, which display type
it is working on, is the best idea. Since it is a testing environment,
you or the test framework should know.

Nevertheless - my idea:
directly access the settings pane, that contains the information with a few clicks.

This worked for me (sorry, german Windows, so I do not have the exact
english words):

The prefs dialog has a head line reading something like this: optimize
readability ...

Enter some of the key words of this phrase into the search field behind
the start button and you will have the possibility, to directly access
your pane (MS is crazy: it is another text, that is shown in the search
results, something like: text and other elements ....).

so in the script:
- open the start dialog with it's keyboard shortcut
- enter the text, that selects your pane as the only search result
- tab (one or 2 times, I do not remember)
- hit enter

and voila: your settings pane should come up.

Since this is a fixed layout, it should be rather easy, to find out what
is checked.

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