Copy link to clipboard
Copied
if i run this command on windows cmd
type "%localappdata%\temp\ClipBoard.txt" | clip
it copies all content of that txt to the clipboard excellent.
now, do I execute this command in extend-script without getting any script error popups or admins rights popups?
CopyClipboardd.onClick = function(){
var cmd, isWindows;
path = Folder.temp.fsName + "/ClipBoard.bat"
cmd = 'cmd.exe /c cmd.exe /c "echo type "%localappdata%\temp\ClipBoard.txt" | clip"';
system.callSystem(cmd);
}
this is what I have cmd pops up but the code is not executing well I guess. kindly assist me asap anybody, please.
1 Correct answer
Sorted fixed it only 1 \ made a difference
CopyClipboardd.onClick = function(){
//type "%localappdata%\temp\ClipBoard.txt" | clip
var cmd, isWindows;
var path;
copyTextToClipboard2(tbProp.text)
cmd = 'cmd.exe /c cmd.exe /c \" type "%localappdata%\\temp\\ClipBoard.txt" | clip"';
system.callSystem(cmd);
}
Copy link to clipboard
Copied
cmd = 'cmd.exe /c cmd.exe /c "echo type "%localappdata%\\temp\\ClipBoard.txt" | clip"';
system.callSystem(cmd);
not working
Copy link to clipboard
Copied
The Windows command prompt/ scripting host itself runs with escalated permissions. In order to bypass any security warnings or dialogs you may need to mess with your group policies, create a special registry key or change the user level in your batch file and then invoke cmd. Nothing to do with AE, just how Windows works.
Mylenium
Copy link to clipboard
Copied
Sorted fixed it only 1 \ made a difference
CopyClipboardd.onClick = function(){
//type "%localappdata%\temp\ClipBoard.txt" | clip
var cmd, isWindows;
var path;
copyTextToClipboard2(tbProp.text)
cmd = 'cmd.exe /c cmd.exe /c \" type "%localappdata%\\temp\\ClipBoard.txt" | clip"';
system.callSystem(cmd);
}

