Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to put a delay
#1
One of my shortcut is to enter my username then my password and then press enter all in one. The problem is the enter is too quick and sometimes my password is not completed before the enter occures. It leads to an error and I have to do it all over again. Is there a way to have a delay between the end of the password and the enter?
Reply
#2
I know you can do it with Autohotkey programmation. I am not an expert with AHK but you can put a delay between your password and your enter command with a sleep. Maybe someone can tell you how to write it down in the Run AutoHotkey code section in Shortkeeper!
Reply
#3
Based on the information above, I would create a shortcut with the "Run AutoHotkey code" command in ShortKeeper (instead of the "Insert text" command) using the following code:

Need help creating a keyboard shortcut with ShortKeeper using the following AutoHotkey code? This 5-minute tutorial will help!
SendInput {raw}
(
Username Password
)
Sleep 1000
SendInput {enter}

The script presupposes a tab separating the Username and Password (line #3), and a 1-second delay between the Password and Enter (Sleep 1000 at line #5). If you need 2 seconds, just change this to Sleep 2000.

Keep in mind that this short code is not especially reliable. The "Enter" won’t work if the webpage takes more than one second (or two) to open.

If you could let me know the URL of the login page, I could come up with something a lot more reliable (like this script).
Enterpad: For those who need more than a few shortcuts.

Reply
#4
Hi Denilama! First thank you for your time and advice. The URL of the login page is : https://login.questrade.com/Signin.aspx. I can't wait to see the best way to make it work! Thanks again!
Reply
#5
This AutoHotkey script should do the work (YourUsername and YourPassword must be set at lines #1 and #2) (Do not remove quotation marks).:

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 := "https://login.questrade.com/Signin.aspx"
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True
wb.Navigate(URL)
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
  Sleep, 100
wb.document.getElementById("ctl00_DefaultContent_txtUsername").value := Username
wb.document.getElementById("ctl00_DefaultContent_txtPassword").value := Password
wb.document.getElementById("ctl00_DefaultContent_btnLogin").Click()

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

If Questrade changes the way its web page works, this script might stop working. If you experience any problems, kindly let us know with a post on this thread. You can subscribe to the thread to be notified of any updates.
Enterpad: For those who need more than a few shortcuts.

Reply
#6
Thank you so much Denilama! It works perfectly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)