Automating Web site login

Top  Previous  Next

This example demonstrates:

®Inserting a User ID and password in the appropriate fields for logging into a Web site or any program which requires a user login.

Application notes:

®Should work in most programs, especially any which run in a compatible Web browser.
 

This example builds on ideas from the Tutorial.

A Macro for Logging in to Xero

Many programs have a feature for automating logins to Web sites or other applications—most Web browsers offer a feature like that. So you may not need a FullSpeed macro for automating logins. But then again, if you are not using the automated login feature of some other program, why not use a FullSpeed macro for that purpose? Also, you can have security of knowing that your login information is stored on your local computer, not "on a server somewhere out there in the cloud".

This topic shows how to set up a macro that will supply the user ID and password for logging in to Xero's Web site. The technique shown here will work in many different programs, not just in a Web browser.

FullSpeed files are not secure! FullSpeed files are not encrypted, and the password feature only protects files from being overwritten not from being read by others.
 
If you store passwords or other private information in a FullSpeed file, protect the file from unauthorized access by storing it in a private folder of your hard drive, such as C:\Users\yourname\Documents, where yourname is your Microsoft Windows login name. (Note that this protection can only be effective if your Windows login account requires a password to log into Windows.)

Getting Ready

Understanding what is needed

Here are two different Xero login windows:

 

If you clicked in the Email address field of either window, then pressed the Tab key, the focus would move to the Password field. So both windows work the same way, and the same macro can be used for logging into Xero regardless of which window is presented.

Set up the macro worksheet

You need a formula to enter the user ID (email address) and another to enter the password. These formulas don't "calculate" anything; they just enter the text of the email address and password. They must be entered as formulas because FullSpeed macros will only write formula results to the target application. Besides formulas, you also need to mark the first formula's cell as the Begin field.

Notes:

®The target application type is set to Generic, which should allow it to work in many applications.
®The repeat type is Run once, so the macro will only run once when invoked.
®We have assigned Shift+Ctrl+L as the macro's hotkey, but you may assign any hotkey you want.

Running the Macro

1.Click in the Enter password field of the login window.

 As always, you must start a the field corresponding to cell you marked as the Begin field in FullSpeed.

2.Press the hotkey you assigned to the macro.

 Here's the result:

A Login with a "Wrinkle"

What if the user ID and password fields are separated by other field(s) or a Web link? You can still set up a FullSpeed macro to make user ID and password entries in the appropriate locations.

Understanding what is needed

Here is the login box on a Web site where the Login ID and Password fields are separated by a Web link (circled in red to show its location).

If you start in the Login ID field and press the Tab key, the focus does not move directly to the Password field as you might expect. Rather, it moves to the Web link. It takes a second press of the Tab key to actually get to the Password field. So the macro just needs to allow for an extra "field" between the Login ID and Password fields.

Set up the macro worksheet

Here's a modified version of the macro worksheet shown above. The password formula has been moved to the right so that the macro will send the keystrokes needed to bypass the Web link in the login box.

Running the macro

If we click in the Login ID field of the login box, then press the macro's hotkey, here is the result: