;ahk爬虫 ;爬取十个页面 if !A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" ExitApp } pwb := ComObjCreate("InternetExplorer.Application") ;创建IE对象 pwb.visible:=true ; 设置IE对象为可见 loop,10 { postindex:=8471+A_Index-1 ;url=http://www.autoahk.com/archives/%postindex% ;传统附值 url:= "http://www.autoahk.com/archives/" . postindex pwb.Navigate(url) ;导航至网页 while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load { Sleep, 100 } Var:=pwb.document.getElementsByClassName("post-title").item[0].InnerText ;Get classname and Array value if (Var=="未找到") { } else { MsgBox,%var% } }