[英]How can I clear clipboard in Remote Deskop Connection using AutoIT
Is there any code to check unfortunate window appears on screen while automating?是否有任何代码可以检查自动化时屏幕上出现的不幸窗口?
public static void clearclip()
{
var check = Sikuli.CreateSession();
var clipErr = Patterns.FromFile(@"C:\driver\..PNG");
auto.Sleep(100);
clipput:
auto.ClipPut("");
if(check.Exists(clipErr,3))
{
auto.Send("{ESC}");
}
if (auto.ClipGet() != "")
goto clipput;
}
this is the code you're looking for:这是您正在寻找的代码:
Download and copy to script folder the ImageSearch library https://www.autoitscript.com/forum/topic/148005-imagesearch-usage-explanation/下载 ImageSearch 库并将其复制到脚本文件夹https://www.autoitscript.com/forum/topic/148005-imagesearch-usage-explanation/
Create a new Autoit script file and name it as you want.创建一个新的 Autoit 脚本文件并根据需要命名。
#include <ImageSearch.au3> While 1 $x=0 $y=0 $image="example.png" do $result = _ImageSearch($image, 1, $x, $y, 0) until $result = 1; if $result=1 Then Send("esc") EndIf Wend
If the image is found, the variables X, Y will have width & height values如果找到图像,变量 X、Y 将具有宽度和高度值
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.