首页 > 代码库 > AutoIT 实现Firefox上传文件

AutoIT 实现Firefox上传文件

Firefox浏览器文件上传代码如下:

;upload fileFunc _UploadFile($file)	AutoItSetOption("WinTitleMatchMode", 2)		 WinWaitActive("","", 15);	 	If WinActivate("", "") Then		;MsgBox(64,"hello","have Window!!!")		ControlSetText("", "", "[CLASS:Edit; INSTANCE:1]", "D:\b.png")		ControlClick("", "","[CLASS:Button; TEXT:打开(&O)]")	Else		Return False		;MsgBox(64,"hello","No  Window!!!")	EndIf	Exit	EndFunc_UploadFile($CmdLine[$CmdLine[0]])

  

AutoIT 实现Firefox上传文件