如何使用Firefox而不是IE在AutoIt脚本中自动填写Web表单? [英] How to fill web forms automatically in AutoIt script using Firefox instead of IE?
本文介绍了如何使用Firefox而不是IE在AutoIt脚本中自动填写Web表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我离开Autoit已有一段时间了,我希望重写脚本以使用Firefox而不是IE.
I’ve been away from Autoit for a while and I’m looking to rewrite my scripts to use Firefox instead of IE.
我会很高兴有人为我提供一些示例脚本,例如,这些脚本演示了如何打开Firefox到预定的网站并提交用户名和密码.
I would appreciate someone pointing me to some example scripts which, for example, show how to open Firefox to a predetermined website and submit a username and password.
谢谢!
我已经尝试过此代码
$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.
I have installed mozrepl also..
推荐答案
以下是连接到Facebook的示例:
Here an example to connect to 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
这篇关于如何使用Firefox而不是IE在AutoIt脚本中自动填写Web表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文