单击基于茄子的文字的复选框
我正在尝试创建一个通用处理程序来选择复选框。但我所说的通用是指它能够根据复选框旁边的下一个来选择它。就像一排写着“选项 1、选项 2、选项 3”的复选框,复选框位于文本左侧一点,三个选项放置在一列中。
下面的代码错误 imagefound 错误 - 无效的矩形:MySearchRect (它说它要么找不到矩形,要么坐标不正确或无效 要处理 SelectBox
参数 Check_Name,
请将 SearchRectangle 设置为我的 QueryPaneSRC,
将 TextLocation 设置为 ImageRectangle (text:(Check_Name)),
将 Check_Name 设置为(左侧为 TextLocation – 35,TextLocation 右侧,TextLocation – 3 顶部,RemoteScreenRectangle 右侧,RemoteScreenRectangle 底部) TextLocation + 2)
put MySearchRect
If ImageFound(ImageName:”Images/Box_UNCHECKED”, searchRectangle: MySearchRect
然后
Click FoundImageLocation()
返回 Else
ImageFound(ImageName:”Images/Box_CHECKED”, searchRectangle: MySearchRect
返回 如果
结束 SelectBox 则
结束运行 SelectBox ”选项 1”
I am trying to create a generic handler for selecting a checkbox. But by Generic I mean it’s able to pick it based on the next next to the check box. Like a row of check boxes that say “Option 1, option 2 , Option 3” with the checkbox a little to the left of the text and the three options placed in a column.
The below code errors imagefound Error - Invalid Rectangle: MySearchRect (its saying it either cant find the rectangle or the coordinates are not right or not valid
To handle SelectBox
params Check_Name
Set SearchRectangle to my QueryPaneSRC
set the TextLocation to ImageRectangle (text:(Check_Name))
set Check_Name to (left to TextLocation – 35, right of TextLocation, top of TextLocation – 3, right of the RemoteScreenRectangle, the bottom of TextLocation + 2)
put MySearchRect
If ImageFound(ImageName:”Images/Box_UNCHECKED”, searchRectangle: MySearchRect
Then
Click FoundImageLocation()
Return
Else
ImageFound(ImageName:”Images/Box_CHECKED”, searchRectangle: MySearchRect
Return
End if
End SelectBox
Run SelectBox ”Option 1”
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论