1:
eg:
For example, this will input all the text fields within a gaven page:
Dim oDesc
Set oDesc = Description.Create
oDesc("micclass").Value = "WebEdit"
Dim oChildren
Dim i
Set oChildren = Browser("index:=0").Page("index:=0").ChildObjects(oDesc)
For i = 0 to oChildren.Count - 1
oChildren.Item(i).Set "input value"
Next
2:
eg:
The .ChildObjects command can be combined with the Desktop object. to run through all the top-level
windows and applications.
For example, this will hightlight every opened Notepad window.
Dim oDesc
Set oDesc = Description.Create
oDesc("nativeclass").Value = "Notepad"
Dim oChildren
Dim i
Set oChildren =Desktop.ChildObjects(oDesc)
For i = 0 to oChildren.Count - 1
oChildren.HighLight
Next

本文介绍了使用自动化脚本批量操作UI元素的方法,包括输入所有页面内的文本字段及高亮显示所有打开的记事本窗口。
647

被折叠的 条评论
为什么被折叠?



