Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keyboard Shortcut - Auto Login to a TMX Money Account
Stock trading requires you to be fast. If you have an account on TMX Money ( and want a keyboard shortcut that will automatically log you in, the following AutoHotkey script will help. The shortcut will open TMX Money in Internet Explorer, enter your username and password in the appropriate fields, and bring you to your TMX Money home page.

Need help creating a keyboard shortcut with ShortKeeper using the following AutoHotkey code? This 5-minute tutorial will help!

Attention: This AutoHotkey script is kept for reference purposes only. It is based on the web browser Internet Explorer, which is no longer supported or updated by Microsoft.
Username := "YourUsername"
Password := "YourPassword"
URL := ""
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True
TimeOut := 20
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy
 Sleep, 1000
 TimeOut := TimeOut - 1
 if (TimeOut = 0)
Sleep, 1000
wb.document.getElementById("qm-username").value := Username
wb.document.getElementById("qm-password").value := Password

At lines #1 and #2, “YourUsername” and “YourPassword” must be replaced with the actual user name and password (do not remove quotation marks).

At line #7, a timeout delay of 20 seconds is set in case the script becomes unresponsive (e.g. due to a slow Internet connection) in attempting to load the TMX Money login page. If the timeout expires, the script will simply terminate without inserting the username and password. The timeout delay can be changed if needed.

At line #15, a 1000 milliseconds pause is inserted after the TMX Money login page is loaded and before inserting the username and password. You might have to lengthen the pause for a slow computer.

This script will also work if you are already logged into TMX Money. It will start Internet Explorer even if this is not your default browser. The script was tested with Windows 7 and 10.

If TMX Money changes the way its web page works, this script might stop working. If you experience any problems, please let me know with a post on this thread. You can subscribe to the thread to be notified of any updates.

Use a password stored in an external encrypted file

Someone with access to your ShortKeeper application might be able to see your TMX Money password, which some users may find insecure. This section explains how to use a password stored in a separate file that is protected with a master password.

To begin, replace line #2 of the script above with the following two lines:
PasswordName := "tmxmoney"
ExternalFileName := "T:\MyData.ini"
At line #2, "T:\MyData.ini" must refer to the path and filename of the external password file (do not remove quotation marks).

Now, to get the password from the external file, the following line of code must be inserted between line #16 and line #17 of the script above:
IniRead, Password, % ExternalFileName, % "Passwords", % PasswordName

The following line inserted between lines #17 and #18 will make sure the password in the computer memory is cleared as soon as possible:
Password :=

Then you will have to create an external file (a simple text file will do) with an ".ini" extension with content like this:


You can add all of your other passwords to the same file.

If the external file cannot be read (e.g. if it is encrypted), the inserted password will be "ERROR" instead of the actual password.

There are several ways to encrypt/decrypt the external file. If you are using TrueCrypt, you could insert the following code between lines #3 and #4 above. This will prompt you to enter the master password if the file is not already decrypted:
if (!FileExist(ExternalFileName))
TrueCryptPath := "C:\Program Files (x86)\TrueCrypt\TrueCrypt.exe"
ContainerPath := "U:\"
RunWait % TrueCryptPath . " /q /lt /v " . ContainerPath
At line #3, "C:\Program Files (x86)\TrueCrypt\TrueCrypt.exe" must refer to the path of TrueCrypt.exe (do not remove quotation marks).

At line #4, "U:\" must refer to the path of the TrueCrypt file container (do not remove quotation marks).[/i]
Enterpad: For those who need more than a few shortcuts.


Forum Jump:

Users browsing this thread: 1 Guest(s)