コード例 #1
0
ファイル: wwfbot.py プロジェクト: dbieber/ScrabbleBot
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])
コード例 #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])
コード例 #3
0
ファイル: wwfbot.py プロジェクト: dbieber/ScrabbleBot
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
コード例 #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
コード例 #5
0
ファイル: wwfbot.py プロジェクト: dbieber/ScrabbleBot
def clickBoardAt(x0, y0):
    windowsBot.click(offset[0] + shiftX + x0, offset[1] + shiftY + y0)
コード例 #6
0
def clickBoardAt(x0, y0):
    windowsBot.click(offset[0] + shiftX + x0, offset[1] + shiftY + y0)