admin管理员组文章数量:1392002
Using WinWrap, trying to open Notepad and paste the Clipboard text inside. I mean, it works on Windows 10 but on Windows 11 it seems like the TaskID returned from Shell command is wrong, so the AppActivate(TaskID) fails.
Notepad opens and I can see the text pasted, but I'm inside an "On Error" statement, so an error message appears to the user. The error description is "Impossible to find the window".
This is the part of the code:
Clipboard Msg & vbCrLf
TaskID = Shell("Notepad",vbNormalFocus )
Debug.Print(TaskID)
AppActivate(TaskID)
SendKeys("^V"),1 'Control-V
If I take a look to the debug, I can see that the TaskID is different from the notepad PID on the task manager.
Any suggestion?
本文标签: winwrapShell command return wrong TaskID on Windows 11Stack Overflow
版权声明:本文标题:winwrap - Shell command return wrong TaskID on Windows 11 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744767604a2624135.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论