screenshot_tool.py 文件源码

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

项目:RunescapeBots 作者: lukegarbutt 项目源码 文件源码
def take_screenshot():
    file_name = 'screenshots/' + input("What would you like to save the screenshot as? Please enter the entire file name including extension, ie .png\n")
    input("Place curser over the top left corner of the box you'd like to screenshot and press enter")
    top_left = pyautogui.position()
    input("Place curser over the bottom right corner of the box you'd like to screenshot and press enter")
    bottom_right = pyautogui.position()
    time.sleep(3)
    width = bottom_right[0] - top_left[0]
    height = bottom_right[1] - top_left[1]
    pyautogui.screenshot(file_name, region=(top_left[0], top_left[1], width, height))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号