F2::
SendText(SelectString,1)
Return
F1::
SelectString:=CopySelectString()
Return
/*
Ctrl+V方式发送字符串剪切板不留迹示例
,ClipMode?1剪切板中转上屏:发送上屏
*/
SendText(Text,ClipMode=0){
Static lastClip
if (Text="")
Return
if ClipMode {
lastClip:=Clipboard
Clipboard:=""
Clipboard:=Text
ClipWait,0.1
SendInput, ^{vk56sc02F}
WaitClipReady()
Clipboard:=lastClip
}Else{
SendInput,% Text
}
}
WaitClipReady(timeout=100){
start_time := A_TickCount
sleep 50
while (DllCall("user32\GetOpenClipboardWindow", "Ptr")&&(A_TickCount-start_time<timeout))
sleep,10
}
;;Ctrl+C方式获取选中字符剪切板不留迹示例
CopySelectString(){
BlockInput,On
lastClip:=Clipboard
Clipboard:=""
SendInput, ^{vk43sc02E}
BlockInput,Off
ClipWait,0.1
string:=Clipboard
Clipboard:=lastClip
Return string
}
大佬这是做撒的呀
做啥的zuo’sha
如果剪切板中式图片会重复图片,win10打开云剪切板的情况下!