We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4769ea0 commit 881b043Copy full SHA for 881b043
clipshot.lua
@@ -17,10 +17,11 @@ local platform = mp.get_property_native('platform')
17
if platform == 'windows' then
18
file = os.getenv('TEMP')..'\\'..o.name
19
cmd = {
20
- 'cmd', '/c', string.format(
21
- 'powershell -NoProfile -Command %q',
22
- "Add-Type -Assembly System.Windows.Forms, System.Drawing; "..
23
- "[Windows.Forms.Clipboard]::SetImage([Drawing.Image]::FromFile('"..file.."'))"
+ 'powershell', '-NoProfile', '-Command',
+ 'Add-Type -Assembly System.Windows.Forms, System.Drawing;',
+ string.format(
+ "[Windows.Forms.Clipboard]::SetImage([Drawing.Image]::FromFile('%s'))",
24
+ file:gsub("'", "''")
25
)
26
}
27
elseif platform == 'darwin' then
0 commit comments