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
def getPosY(self,srcPer): srcPer=srcPer*0.01 wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle) height = wBottom-wTop return int(wTop+(height*(srcPer)))
def getPosX(self,srcPer): srcPer=srcPer*0.01 wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle) width = wRight-wLeft return int(wLeft+(width*srcPer))
def getWinH(self): wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle) height = wBottom - wTop return height
def getWinW(self): wLeft, wTop, wRight, wBottom = screen.appGetWindowRect(self.handle) width = wRight - wLeft return width