好久不见了

真是很久没有写学习文章了==懒惰

记录下我的最近研究的autoit

传文件咯
#include 
#include 
#include 

Func _fileUp($WindowsName,$ControlID,$fileName,$butId)
      $WindowText=""
      ControlFocus($WindowsName, $WindowText,$ControlID)
      WinWait("[CLASS:#32770]","",10)
      ControlSetText($WindowsName, $WindowText, $ControlID, $fileName)
      $ret = ControlClick($WindowsName, $WindowText,$butId)
      if $ret Then
         Return 0
      Else
         Return 1
      EndIf
EndFunc

treeview操作
Func _treeList($WindowsName,$ControlID,$Combo2)
      $WindowText=""
      $TreeView = ControlGetHandle($WindowsName,$WindowText,$ControlID)
      ;ControlTreeView($WindowsName,"",$TreeView,"Expand",$Combo1)
      if ControlTreeView($WindowsName,"",$TreeView,"Exists",$Combo2) Then
         ControlTreeView($WindowsName,"",$TreeView,"Select",$Combo2)
      EndIf
      $hItem =_GUICtrlTreeView_GetSelection($TreeView)
      $ret = _GUICtrlTreeView_ClickItem($TreeView,$hItem, "left", False, 2)
      if $ret Then
         Return 0
      Else
         Return 1
      EndIf
EndFunc

listview操作
Func _selList($WindowsName,$ControlID,$SelNum)
      $WindowText=""
      $ListView = ControlGetHandle($WindowsName,$WindowText,$ControlID)
      $ret = _GUICtrlComboBox_SetCurSel($ListView, $SelNum)
      if $ret Then
         Return 0
      Else
         Return 1
      EndIf
EndFunc

你可能感兴趣的:(好久不见了)