????????????????????????AutoIT????????????????????????AutoIT?????????ó???????????????????????????GUI????????????????AutoIT?????????????????????????????????????????б???AutoIT?????????????Windows??????????????????????????ó????????????????????????????????COM????????????AutoIT??????
????1. ?????????
??????д??????????????????????????????????Σ?????????У???????????????????????????????????Title???????????????????????????????????????????????????????????text??????????????????????????????饗?????????????????????????????AutoIt???????????????AutoIt Window Info???????????????????????????????????????????±?????notedad.exe????????????????“????????±?”?????????????????????????Сд??е?????????????????????????????????????????
????AutoIt??????????????д??????????????????????????WinWaitActive?????????????????????????????в?????????????????????????
????WinWaitActive(“???????"??["???????"]??[??????])
???????У?“???????”?????????????????"???????"??"??????"???????????????????Щ???????????????????????????????????????????????????????????""????????????ɡ??????????????????????????????????????NULL???????????AutoIt?κ??????????Ч???
????????????±?????????????????????????????÷???
????WinWaitActive(“?????-???±?")
??????
????WinWaitActive(“?????-???±?"??"")
????2. ??????
????AutoIt?е???????????洢????????Windows Handles??????ν?????????Windows????????????′???????????????????????????????洰???????????????????????洰??????????????????????????????磬??????????????????ó??????????????Щ??????????????????????????????????????????????????????????????????????
???????????WinGetHandle??WinList??GUICreate??????????????????
????$handle=WinGetHandle(“?????-???±?”)
????WinClose($handle)
???????????????WinTitleMatchMode??????????????????????????á?
????3. ??????????
????AutoIt???????????????????????????????????????????????????е???????????б?????????????????????磬?????????±?????????????????????????????“????Edit??”?????????????AutoIt??????????????????????????????????????????????????????????????????????????????????????????
????AutoIt??????????Microosft???????Щ??ó????????????????????????????????MS??????????????????????????????????????
?????????Control…????????????Щ?????????????ControlID???????Щ????????????????????Щ??????????
????ID??????????ID??
????TEXT????????????"?????"?????
????CLASS????????????????????"Edit"??"Button"??
????INSTANCE??????
????CLASSNN???????????"Edit1"??
?????????????????????????????????????á???????????????????????????????????AutoIt?????????????????????????????????????????????ID??????????ID??????????ID???????????????????????????????????????????????????????
???????磬????????????±????1??Edit?????
????ControlSend(“?????-???±?”??""??"[CLASS:Edit;INSTANCE:1]”??"?????Щ???")
??????
????ControlSend(“?????-???±?"??""??"[CLASSNN:Edit1]”??"?????Щ???")
??????
????ControlSend(“?????-???±?"??""??"Edit1”??"?????Щ???")
????????“??????”???????????????ID 254????????????ID:
????ControlClick(“??????"??""??"[ID:254]")
??????
????ControlClick(“??????"??""??254)
???????絥????2??????“???”????????????????????
????ControlClick(“??????"??""??"[CLASS:Button;TEXT:”???";INSTANCE:2]")
??????????????????????????ControlGetHandle??????????????Windows???????????????????????????????????в??????????????£?
????$handle=ControlGetHandle(“Untitled- Notepad”??""??"Edit1")