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

    Status: Open => Answered

RaiMan proposed the following answer:
bottom = Region(0,940,1920,140)
this produces the error and should be avoided, if you do not want the error on 
non-appropriate screen.

So let us fix it and additionally get better Python:

def adaptToScreenResolution(rx, ry, rw, rh):
    resizeFactorX = SCREEN.w/1920
    resizeFactorY = SCREEN.h/1080
    x = int(rx*resizeFactorX)
    y = int(ry*resizeFactorY)
   w = int(rw*resizeFactorX)
    h = int(rh*resizeFactorY)
    return Region(x, y, w, h)

bottom = adaptToScreenResolution(0, 940, 1920, 140)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to