Esempio n. 1
0
def clickImage(im):
    screen = ImageGrab.grab()
    coords = findSubimage(im, screen)
    if not coords:
        print("Couldn't find image to click")
        return
    windowsBot.click(coords[0], coords[1])
Esempio n. 2
0
def clickImage(im):
    screen = ImageGrab.grab()
    coords = findSubimage(im, screen)
    if not coords:
        print("Couldn't find image to click")
        return
    windowsBot.click(coords[0], coords[1])
Esempio n. 3
0
def selectOpenGame(im):
    screen = ImageGrab.grab()
    coords = findSubimage(wwfYourMove, screen)
    if not coords:
        print("Try 2")
        coords = findSubimage(wwfYourMove2, screen)
        if not coords:
            return False
    #should choose a game randomly. Just first game for now.
    windowsBot.click(coords[0]+20, coords[1]+20)
    time.sleep(2)
    return True
Esempio n. 4
0
def selectOpenGame(im):
    screen = ImageGrab.grab()
    coords = findSubimage(wwfYourMove, screen)
    if not coords:
        print("Try 2")
        coords = findSubimage(wwfYourMove2, screen)
        if not coords:
            return False
    #should choose a game randomly. Just first game for now.
    windowsBot.click(coords[0] + 20, coords[1] + 20)
    time.sleep(2)
    return True
Esempio n. 5
0
def clickBoardAt(x0, y0):
    windowsBot.click(offset[0] + shiftX + x0, offset[1] + shiftY + y0)
Esempio n. 6
0
def clickBoardAt(x0, y0):
    windowsBot.click(offset[0] + shiftX + x0, offset[1] + shiftY + y0)