test.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:FindColor 作者: JarenChow 项目源码 文件源码
def main():
    set_window_top()
    print u'????? http://cn.vonvon.net/quiz/743 ??????'
    print u'????????????????? y/n\n> ',
    choice = raw_input()
    offset_x, offset_x_r, offset_y, offset_y_r = 0, 0, 0, 0
    if choice == 'y':
        offset_x = 770
        offset_y = 265
        offset_x_r = 1145
        offset_y_r = 640
    elif choice == 'n':
        print u'???????, ??????????????'
        count_down(3)
        offset_x, offset_y = win32api.GetCursorPos()
        print u'?????, ????????'
        count_down(3)
        offset_x_r, offset_y_r = win32api.GetCursorPos()
        print u'????????...'
    global im
    count = 50
    while count:
        count -= 1
        im = grab((offset_x, offset_y, offset_x_r, offset_y_r))
        mouse_move([sum(i) for i in zip((offset_x, offset_y), get_position())])
        sleep(0.1)
        mouse_click()
        sleep(0.2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号