0

control+a我可以使用后跟control+alt+c命令从 potplayer 播放列表中复制完整的播放列表以及路径。potplayer 可在以下地址获得

C:\Program Files (x86)\The Kmplayer\PotPlayerMini64.exe.

是否可以从 emeditor 宏代码中获取上述播放器的文本?是否可以将消息发送到外部窗口并从那里将文本复制到编辑器?

4

1 回答 1

0

我不确定您使用的potplayer。但是,如果您知道要发送Ctrl+ACtrl++键的窗口的窗口标题或类名,则可以编写类似这样的代码AltC

wnd = shell.FindWindow( "", "potplayer window title" );
wnd.SetForeground();
shell.SendKeys( "^a" );
Sleep( 100 );
shell.SendKeys( "^%c" );

如果您不知道窗口标题或类名,但运行应用程序路径“C:\Program Files (x86)\The Kmplayer\PotPlayerMini64.exe”会激活窗口,您可以运行以下命令:

WshShell = new ActiveXObject( "WScript.Shell" );
WshShell.Run( "C:\\Program Files (x86)\\The Kmplayer\\PotPlayerMini64.exe" );
Sleep( 1000 );
shell.SendKeys( "^a" );
Sleep( 100 );
shell.SendKeys( "^%c" );

参考

于 2020-10-01T16:38:33.490 回答