如何使用 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 Firefoxfirefox.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屋!
查看全文