单击基于茄子的文字的复选框

发布于 2025-01-19 17:51:05 字数 811 浏览 2 评论 0原文

我正在尝试创建一个通用处理程序来选择复选框。但我所说的通用是指它能够根据复选框旁边的下一个来选择它。就像一排写着“选项 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文