随笔分类 - AutoIT
Windows GUI automation test
    
摘要:句柄是独一无二的,很多时候,Title,Command都可以用句柄来代替。以下写法是能够起一样的作用。$handle= WinGetHandle("autoit cn")$ctrl= ControlGetHandle("autoit cn","","[CLASS:Button;INSTANCE:5]")ControlClick($handle,"",$ctrl);controlclick("autoitcn", "", "[CLASS:Butto
        阅读全文
            
摘要:$handle= WinGetHandle("Program Manager")$ctrl= ControlGetHandle("ProgramManager","","[CLASS:SysListView32; INSTANCE:1]") $pos= WinGetPos ($handle)MsgBox(0,"DesktopWidth","Desktopwidth: " & $pos[2] & @CRLF & "Desktop height:
        阅读全文
            
摘要:Example()FuncExample() ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window toappear. Local $hWnd =WinWait("[CLASS:Notepad]", "", 10) MsgBox(1,"Test1", $hWnd, 3) ; Convert the handle to a string. Local $sHWnd = String($hWnd) MsgBox(1,"
        阅读全文
            
摘要:If WinExists("[CLASS:Notepad2]") Then Local $hWnd = WinWait("[CLASS:Notepad]", "",10) ; Convert the handle to a string. Local $sHWnd = String($hWnd) WinActivate("[CLASS:Notepad]") ;WinWaitActive("[class:Notepad]") Send("Hello")EndIf
        阅读全文
            
摘要:1. ControlSetText :可以摆脱Send的限制,在适当的文本框位置输入用户想要输入的信息。2. ControlGetText可以获取文本Run("notepad.exe")WinWait("[CLASS:Notepad]") ControlSetText("[CLASS:Notepad]", "", 15,"New Text Here")Local $sText = ControlGetText("[CLASS:Notepad]","", 1
        阅读全文
            
                    
                
浙公网安备 33010602011771号