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)
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)
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)
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)
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)