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

RaiMan posted a new comment:
The following solution can be integrated a bit easier into a Sikuli
script, because you do not need an extra .vbs script file.

It uses the reg command.

import os
regKey = r"HKCU\Control Panel\Desktop\WindowMetrics"
regField = "AppliedDPI"
cmd = 'reg QUERY "%s" /v %s'%(regKey, regField)
result= os.popen(cmd).readlines()
print eval(result[-2].strip().split()[-1]), "DPI"

The last statement builds on the knowledge, how the output of the reg
command looks like, and prints the DPI as decimal value.

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to