示例#1
0
    def screenshot():
        """takes a screenshot of the entire screen and saves it to the desktop as screenshot.png"""
        img = screen.capture_rect(screen.main_screen().rect)
        path = get_screenshot_path()

        img.write_file(path)
        app.notify(subtitle="Screenshot: %s" % path)
示例#2
0
文件: screenshot.py 项目: eprev/talon
def get_screen(screen_number: Optional[int] = None) -> ui.Screen:
    if screen_number == None:
        return screen.main_screen()
    return actions.user.screens_get_by_number(screen_number)
示例#3
0
 def screenshot_clipboard():
     '''takes a screenshot of the entire screen and saves it to the clipboard'''
     img = screen.capture_rect(screen.main_screen().rect)
     clip.set_image(img)
示例#4
0
 def screenshot():
     '''takes a screenshot of the entire screen and saves it to the desktop as screenshot.png'''
     img = screen.capture_rect(screen.main_screen().rect)
     path = os.path.expanduser(
         os.path.join('~', 'Desktop', 'screenshot.png'))
     img.write_file(path)
示例#5
0
 def screenshot():
     """takes a screenshot of the entire screen and saves it to the desktop as screenshot.png"""
     img = screen.capture_rect(screen.main_screen().rect)
     path = os.path.expanduser(
         os.path.join("~", "Desktop", "screenshot.png"))
     img.write_file(path)