这是一个宏片段,用于选择编辑器中的所有文本(过滤后),然后将选择复制到剪贴板,然后是您的代码。您将在过滤文档后运行此宏。
document.selection.SelectAll(); // Select All
document.selection.Copy(eeCopyUnicode); // Copy the selection to the Clipboard
WshShell = new ActiveXObject( "WScript.Shell" ); // your macro
WshShell.Run ( "PotPlayerMini64.exe /clipboard" );
如果你想在你的宏中包含过滤器,你可以使用这个:
strFilter = prompt( "Filter:", "" ); // Prompt for a string
document.Filter( strFilter, 0, 0 ); // Filter (case-insensitive)
document.selection.SelectAll(); // Select All
document.selection.Copy(eeCopyUnicode); // Copy the selection to the Clipboard
WshShell = new ActiveXObject( "WScript.Shell" ); // your macro
WshShell.Run ( "PotPlayerMini64.exe /clipboard" );