Exemple #1
0
    def xyDirection(self, x, y):
        wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle)

        centerX = (wRight-wLeft) >> 1
        centerY = (wTop-wBottom) >> 1
        inLeft = True
        inTop = True
        if x > centerX:
            inLeft = False
        if y > centerY:
            inTop = False
        return inLeft, inTop
Exemple #2
0
 def getPosY(self,srcPer):
     srcPer=srcPer*0.01
     wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle)
     height = wBottom-wTop
     return int(wTop+(height*(srcPer)))
Exemple #3
0
 def getPosX(self,srcPer):
     srcPer=srcPer*0.01
     wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle)
     width = wRight-wLeft
     return int(wLeft+(width*srcPer))
Exemple #4
0
 def getWinH(self):
     wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle)
     height = wBottom - wTop
     return height
Exemple #5
0
 def getWinW(self):
     wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle)
     width = wRight - wLeft
     return width