首页 > 代码库 > AutoIT 实现Firefox下载
AutoIT 实现Firefox下载
Firefox下载的完整代码:
Func IsVisible($handle) ;WinGetState: 2 = Window is visible If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIfEndFunc ;==>IsVisible;firefox下载Func _DownloadFile() AutoItSetOption("WinTitleMatchMode", 2); WinWaitActive("正在打开 test.zip","", 15); If WinActivate("正在打开 test.zip", "") Then Local $handle = WinGetHandle("正在打开 test.zip") Send("!s") Send("{enter}") WinWaitActive("输入要保存的文件名…","") If(WinActivate("输入要保存的文件名…","")) Then ControlSetText("", "", "[CLASS:Edit; INSTANCE:1]", "D:\auto.zip") ControlClick("", "","[CLASS:Button; TEXT:保存(&S)]") ;Returns an array of matching window titles and handles. Local $var = WinList() For $i = 1 To $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" And IsVisible($var[$i][1]) Then ;MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) If $var[$i][0]=="输入要保存的文件名…" And $var[$i][1] <> $handle Then ;MsgBox(64,"hello","have sub Window!!!") Send("!y") EndIf EndIf Next EndIf else Return False EndIf Exit EndFunc_DownloadFile()
AutoIT 实现Firefox下载
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。