我已经离开Autoit一段时间了,我想重写我的脚本以使用Firefox而不是IE。
我希望有人指点我的一些示例脚本,例如,展示如何将Firefox打开到预定的网站并提交用户名和密码。
谢谢!
我试过这段代码
$off=Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe " & $url, "", @SW_MAXIMIZE)
_FFLoadWait($off)
;_FFConnect()
while(_FFLinkClick ("Continue to this website (not recommended).","text"))
_FFLoadWait($oFF,10000)
wend
If _FF_AutoLogin($uName,$pwd, $url, "login was successful", "submit", 0, 1) Then MsgBox(0,"","Login was successful")
;window.content.document.value(formUID)=_FFObj($uName, "value")
;_FF_AutoLogin($uName,$pwd,$url)
_FFSetValueById($uName,$formUID)
_FFSetValueById($pwd,$formPID)
;$oSubmit = $oFF.document.getElementById($formSubmit)
_FFClick ($formSubmit,"id")
我也安装了mozrepl ..
答案 0 :(得分:0)
这是连接到Facebook的示例:
#include <ff.au3>
Local $uName="The_E-Mail_adress_to_your_facebook_account"
Local $Pwd="Your facebook password"
_FFstart()
If _FFConnect(Default, Default, 3000) Then
_FF_AutoLogin($uName, $Pwd, "www.facebook.com","","keypress")
if _FFLoadWait() Then MsgBox("","Your Facebook is loaded","OK")
endif