AutoIT: 学习对GUI Sample上所有的资源进行操作

$handle= WinGetHandle("Sample GUI")
;MsgBox(0,"SRE Example 3 Result", $handle)
$ctrl= ControlGetHandle($handle, "", "Static1")
;MsgBox(0,"SRE Example 3 Result", $ctrl)
$a1= ControlGetHandle($handle, "", "msctls_progress321")
;MsgBox(0,"SRE Example 3 Result", $a1)
 
$a2= ControlGetHandle($handle, "", "SysTabControl321")
;MsgBox(0,"Test",ControlCommand($handle,"","SysTabControl321","TabRight",""))
 
$a3= ControlGetHandle($handle, "", "Edit2")
;MsgBox(0,"SRE Example 3 Result", $a3)
 
$a4= ControlGetHandle($handle, "", "Edit2")
;MsgBox(0,"SRE Example 3 Result",ControlGetText($handle,"","Edit2"))
 
$a5= ControlGetHandle($handle, "", "ComboBox1")
;MsgBox(0,"Test", ControlGetText($a5,"",""))
;$a6= ControlCommand($handle,"", "Button2","Check","")
;ControlSetText($handle,"","Edit3",39)
 
ControlClick($handle,"","msctls_updown321")
;MsgBox(0,"TestListbox",ControlCommand($handle,"","ListBox1","GetCurrentSelection",""))
 
;MsgBox(0,"Test2",ControlListView($handle,"","SysListView321","IsSelected",0))
;MsgBox(0,"Test2",ControlListView($handle,"","SysListView321","GetText",2,1))
 
;ControlClick($handle,"","SysDateTimePick321")
;ControlClick($handle,"","SysMonthCal32")
 
;Expandor get the value of the Tree view
$a6= ControlGetHandle($handle,"", "SysTreeView322")
;MsgBox(0,"Test",ControlTreeView($handle,"","SysTreeView322","Expand","TreeView|#1"))
 
;Checkor uncheck the Tree View
MsgBox(0,"Test",ControlTreeView($handle,"","SysTreeView321","UnCheck","TreeView"))

但是对于上图片中的“菜单”,“日历下拉控件” 以及UpDown右侧的数字增减控件,目前我还不会操作。

 

posted @ 2013-08-16 15:48  chenpassion  阅读(1053)  评论(0编辑  收藏  举报