问题描述
无法将 Ctrl+V 发送到 PureRef。
这是脚本->
F1::
WinActivate,ahk_class Qt5QWindowIcon ;; Activates PureRef
Send,^v ;;; didn't worked
sendinput,^v ;;; didn't worked..
return
有什么问题吗?
任何帮助将不胜感激!
解决方法
您可以采取一些措施来确保您的脚本正确运行。
您的 PureRef 窗口真的用 ahk_class Qt5QWindowIcon
激活了吗?
标准变量 %clipboard% 包含文本形式的剪贴板。
您也可以尝试 SendInput
、SendRaw
和 SendPlay
将剪贴板作为文本发送。
F1::
ClipWait ; Wait for the clipboard to actually contain something
IfWinExist,ahk_class Qt5QWindowIcon ; Make sure the window exists
{
WinActivate ; Uses the window found by IfWinExist
WinWaitActive ; Wait for the window to be active
IfWinActive ; Make sure that the window is active
{
Send %clipboard% ; Send text-content of clipboard
}
}
return