AU3控件操作
来源:互联网 发布:惯性坐标系知乎 编辑:程序博客网 时间:2024/05/20 13:09
1、控件识别
ID - The internal control ID
TEXT - The text on a control, for example "Next" on a button
CLASS - The internal control classname such as "Edit" or "Button"
CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"
NAME - The internal .NET Framework WinForms name (if available)
REGEXPCLASS - Control classname using a regular expression
X \ Y \ W \ H - The position and size of a control.
INSTANCE - The 1-based instance when all given properties match.
controlID parameter:[PROPERTY1 Value1;PROPERTY2:Value2]
用AU3 Info获取控件信息,推荐使用advanced mode,ID不可靠
用ControlGetHandle获取控件句柄,结合相应UDF可以实现较复杂的控件操作
2、控件操作
Sends a mouse click command to a given control:
ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
Sets input focus to a given control on a window:
ControlFocus ( "title", "text", controlID )
Retrieves the internal handle of a control:
ControlGetHandle ( "title", "text", controlID )
Retrieves text from a control:
ControlGetText ( "title", "text", controlID )
Sends a string of characters to a control(add to the end):
ControlSend ( "title", "text", controlID, "string" [, flag = 0] )
Sets text of a control(replace):
ControlSetText ( "title", "text", controlID, "new text" [, flag = 0] )
Sends a command to a control:
ControlCommand ( "title", "text", controlID, "command" [, "option"]
e.g. ControlCommand($hWnd, "", "Radio1", "Check")
Sends a command to a TreeView32 control:
ControlTreeView ( "title", "text", controlID, "command" [, option1] )
e.g. ControlTreeView($hWnd, "", "Treeview1", "Expand","#0")
ControlTreeView($hWnd, "", "Treeview1", "Select","#0")
用 ControlGetHandle获取控件句柄e.g.
Local $hCombo=ControlGetHandle ( $hWnd, "", "Combo1")
_GUICtrlComboBox_SetCurSel ( $hCombo ,1)
如果控件不能识别,还可以模拟键盘和鼠标操作
MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] )
MouseClickDrag ( "button", x1, y1, x2, y2 [, speed = 10] )
Send ( "keys" [, flag = 0] )
ID - The internal control ID
TEXT - The text on a control, for example "Next" on a button
CLASS - The internal control classname such as "Edit" or "Button"
CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"
NAME - The internal .NET Framework WinForms name (if available)
REGEXPCLASS - Control classname using a regular expression
X \ Y \ W \ H - The position and size of a control.
INSTANCE - The 1-based instance when all given properties match.
controlID parameter:[PROPERTY1 Value1;PROPERTY2:Value2]
用AU3 Info获取控件信息,推荐使用advanced mode,ID不可靠
用ControlGetHandle获取控件句柄,结合相应UDF可以实现较复杂的控件操作
2、控件操作
Sends a mouse click command to a given control:
ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
Sets input focus to a given control on a window:
ControlFocus ( "title", "text", controlID )
Retrieves the internal handle of a control:
ControlGetHandle ( "title", "text", controlID )
Retrieves text from a control:
ControlGetText ( "title", "text", controlID )
Sends a string of characters to a control(add to the end):
ControlSend ( "title", "text", controlID, "string" [, flag = 0] )
Sets text of a control(replace):
ControlSetText ( "title", "text", controlID, "new text" [, flag = 0] )
Sends a command to a control:
ControlCommand ( "title", "text", controlID, "command" [, "option"]
e.g. ControlCommand($hWnd, "", "Radio1", "Check")
Sends a command to a TreeView32 control:
ControlTreeView ( "title", "text", controlID, "command" [, option1] )
e.g. ControlTreeView($hWnd, "", "Treeview1", "Expand","#0")
ControlTreeView($hWnd, "", "Treeview1", "Select","#0")
用 ControlGetHandle获取控件句柄e.g.
Local $hCombo=ControlGetHandle ( $hWnd, "", "Combo1")
_GUICtrlComboBox_SetCurSel ( $hCombo ,1)
如果控件不能识别,还可以模拟键盘和鼠标操作
MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] )
MouseClickDrag ( "button", x1, y1, x2, y2 [, speed = 10] )
Send ( "keys" [, flag = 0] )
阅读全文
0 0
- Au3 控件操作
- AU3控件操作
- au3
- 用AUTOIT(Au3)配合JQuery(Js)操作网页自动化
- CoProc.au3
- _dButton.au3
- FTPEx.au3
- FTP.au3
- xml.au3
- 如何开始学习AU3?
- AU3语法介绍
- au3和tcp
- AU3-常用函数1
- 用Au3 发 邮件
- AU3 程序入门
- (个人笔记)au3 入门
- AU3学习笔记
- Au3入门介绍
- SpringBoot(九)SpringBoot整合tk.mybatis
- JAVA、互联网技术、大数据资源共享
- HTML5 响应式图片
- 如何在你的Vue项目配置vux
- 题解&反思(下)
- AU3控件操作
- 12
- js修改标签属性值
- 【Scikit-Learn 中文文档】半监督学习
- nginx 运维手记
- docker搭建WordPress
- [笔记] find: 同时在多种类型文件中搜索字符串
- 使用MockMvc测试Controller
- Android Studio常用快捷键