Jump to content

Recommended Posts

Posted

I'm a newby and am almost lost in the "simple" world of scripting. I've put together my first to log me in to my bank account and would like to have someone look at it and make recommendations (no laughter, please). The script is successful only about 80% of the time. When it fails, it leaves autoIT.exe running that I have to close with the Task Manager. Anyway, here's the code:

#include <ff.au3>

$website = "https://www.bankofamerica.com/smallbusiness/index.jsp"

$winName = "Small Business Loans"

run("C:\Program Files\Mozilla Firefox\firefox.exe " & $website)

$oFF = _FFWindowGetHandle()

_ffLoadWait($oFF)

Send("***password info***{tab}{enter}") ; completes the initial login screen and presses enter to enter password and continue

$winName = "Bank of America | Online Banking | SiteKey"

WinWaitActive($winName)

$oFF = _FFWindowGetHandle()

_ffLoadWait($oFF)

send("***morePasswordInfo***{enter}")

$winName = "Bank of America | Online Banking | Accounts Overview"

WinWaitActive($winName)

$oFF = _FFWindowGetHandle()

_ffLoadWait($oFF)

That's it. Is this the best way to start? What am I doing wrong that causes it to sometime fail?

Thanks.

Bob

Posted

Welcome!

Instead of using the "run" command, use _FFStart or _FFAttach. Scripting using online forms often requires the identification of form and field IDs or names. I use DOM Inspector to find the id. You could also look at the source code. Use _FFObjGet, _FFSetValue and _FFFormSubmit. (See help files for examples.)

Hope that helps. Good luck!

I'm a newby and am almost lost in the "simple" world of scripting. I've put together my first to log me in to my bank account and would like to have someone look at it and make recommendations (no laughter, please). The script is successful only about 80% of the time. When it fails, it leaves autoIT.exe running that I have to close with the Task Manager. Anyway, here's the code:

#include <ff.au3>
$website = "https://www.bankofamerica.com/smallbusiness/index.jsp"
$winName = "Small Business Loans"
 run("C:\Program Files\Mozilla Firefox\firefox.exe " & $website)
 $oFF = _FFWindowGetHandle()
_ffLoadWait($oFF)
Send("***password info***{tab}{enter}") ; completes the initial login screen and presses enter to enter password and continue
$winName = "Bank of America | Online Banking | SiteKey"
WinWaitActive($winName)
 $oFF = _FFWindowGetHandle()
_ffLoadWait($oFF)
send("***morePasswordInfo***{enter}")
$winName = "Bank of America | Online Banking | Accounts Overview"
WinWaitActive($winName)
 $oFF = _FFWindowGetHandle()
_ffLoadWait($oFF)

That's it. Is this the best way to start? What am I doing wrong that causes it to sometime fail?

Thanks.

Bob

Posted

OK, thanks.

Now for Stupid Question #1: I can't get any kind of help on the Firefox side of the house. Do I use the IE variant of the same command?

Bob

Posted

Documentation for FF.au3 can be got here, FireFox Management. The FF and IE UDF's do have similar functions, but they cannot be interchanged. For Firefox, use FF.au3, for Internet Explorer, use IE.au3. There is a UDF for Opera available here (in Example Scripts) also.

Welcome to the Forum. Good luck with your project.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...