Created
August 28, 2025 12:15
-
-
Save jamesWalker55/68398be4f29f537dee37668e5cb9fd70 to your computer and use it in GitHub Desktop.
Script for MPV to copy screenshot to clipboard. Requires `cb.exe` tool in PATH, from https://github.com/Slackadays/Clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy-screenshot.ts | |
var COMMAND_NAME = "screenshot-to-clipboard"; | |
var path = mp.utils.get_user_path("~/AppData/Local/Temp/mpv-screenshot-clipboard.png"); | |
function main() { | |
print("Saving screenshot to " + path); | |
mp.commandv("osd-msg", "screenshot-to-file", path, "video"); | |
mp.commandv("run", "cb", "cp", path); | |
} | |
mp.add_key_binding(undefined, COMMAND_NAME, main); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment