【发布时间】:2019-04-26 16:05:39
【问题描述】:
我正在尝试创建一个热键,可以找到谷歌表格“工具”菜单,单击它,向下移动几个像素,然后单击脚本编辑器。我可以在谷歌表格中执行此操作,但它没有通用键绑定,我必须制作一个宏,我宁愿它只是通用的。
SC163::
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Users\xx\Documents\AHK Scripts\gsheets-tools.bmp
if ErrorLevel = 2
tooltip Could not conduct the search.
else if ErrorLevel = 1
tooltip Image could not be found on the screen.
else
{
mousemove, %FoundX%, %FoundY%, 50
tooltip The image was found at %FoundX%x%FoundY%.
}
return
}
在我硬编码整个图像名称之前,它一直在抛出错误 2。现在它只抛出错误 1,即使我打开了三份工作表副本(每台显示器上一份)。 BMP 不是在这里使用的最佳格式吗?我尝试使用
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *n30 C:\Users\xx\Documents\AHK Scripts\gsheets-tools.bmp
看看增加这个津贴是否会有所帮助,但失败了。正确使用图像搜索的任何提示?这不是什么复杂的游戏功能,只是想找个工具栏点击一下!
【问题讨论】:
标签: autohotkey