Send keystrokes to login site
Re: Send keystrokes to login site
Boiler, I tried your last script as administrator, and the window does not minimize. So it appears that the execution doesn't reach that point, or there's some other reason it doesn't minimize.
Re: Send keystrokes to login site
Did you re-check the window title? It needs to be the title as the URL is loaded -- before you do anything like login to it.
Re: Send keystrokes to login site
URL: https us.etrade.com /home/welcome-back Broken Link for safety
Window Spy title: Investing, Trading and Retirement - E*TRADE Financial - Google Chrome
Window Spy title: Investing, Trading and Retirement - E*TRADE Financial - Google Chrome
Re: Send keystrokes to login site
That URL is different, so I guess you’re saying when you run the login URL it forwards you to the welcome back URL?
When you just run that URL and do nothing else, is the cursor where you expect it to be? Is it flashing in the correct field without you having to click anywhere?
When you just run that URL and do nothing else, is the cursor where you expect it to be? Is it flashing in the correct field without you having to click anywhere?
Re: Send keystrokes to login site
Yes, when I execute my script, that's when I get the 'welcome back' URL. And the password field has a blinking cursor as usual.
Re: Send keystrokes to login site
I’m running out of ideas. Let’s try this. Make sure all instances of Chrome are closed, the run this script:
Let me know if it shows the message box and then what happens. If it doesn’t work, try running it as administrator (and describe what you did to run it as administrator).
Code: Select all
!e::
Run, https://us.etrade.com/e/t/user/login
WinWait, ahk_exe chrome.exe
MsgBox, Click OK to activate the window
WinActivate, ahk_exe chrome.exe
Sleep, 1000
Send, {down}{down}{enter}{enter}
return
Re: Send keystrokes to login site
I ran your script as administrator by right-clicking the script file and selecting, 'run as administrator', but I did not get the message box.
Re: Send keystrokes to login site
Did you press the hotkey? Run it without the hotkey. Just use this script and nothing else inside it, both normal and as admin:
If you're using Google Chrome as your default browser, how can it not show the message box?
Code: Select all
Run, https://us.etrade.com/e/t/user/login
WinWait, ahk_exe chrome.exe
MsgBox, Click OK to activate the window
WinActivate, ahk_exe chrome.exe
Sleep, 1000
Send, {down}{down}{enter}{enter}
return
Re: Send keystrokes to login site
I ran it with the hotkey Alt m. Before our forum session began I ran it without the hotkey as well. The result was always the same i.e. Google would open, the eTrade app would display with a blinking cursor in the password field.
I don't know why I don't get the message; it's as if the MsgBox statement was not executed.
I don't know why I don't get the message; it's as if the MsgBox statement was not executed.
Re: Send keystrokes to login site
Correction: hotkey Alt e not Alt m
Re: Send keystrokes to login site
@boiler
make the msgbox alwaysontop :Are you sure the MsgBox isn’t behind the browser or something?
Code: Select all
settitlematchmode,2
Run, https://us.etrade.com/e/t/user/login
WinWait, ahk_exe chrome.exe
msgbox, 262208,TEST ,Click OK to activate the window
WinActivate, ahk_exe chrome.exe
return
Re: Send keystrokes to login site
The only windows open were Google (ETrade app), notepad, and my Desktop. One by one I minimized each, and there was no hidden MsgBox.
Here's what I got when I double-clicked the AutoHotKey script icon:
Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.
---- C:\Users\new\Desktop\HotKeys and Hotstrings.ahk
001: Return (20381.59)
Press [F5] to refresh.
Here's what I got when I double-clicked the AutoHotKey script icon:
Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.
---- C:\Users\new\Desktop\HotKeys and Hotstrings.ahk
001: Return (20381.59)
Press [F5] to refresh.
Re: Send keystrokes to login site
Did you add these lines to a larger script that contains hotkeys and hotstrings? And did you put those lines below the hotkeys and hotstrings? They will never run if you do that. Please make a script with nothing else in it but these lines and run that:
Code: Select all
settitlematchmode,2
Run, https://us.etrade.com/e/t/user/login
WinWait, ahk_exe chrome.exe
msgbox, 262208,TEST ,Click OK to activate the window
WinActivate, ahk_exe chrome.exe
return
Re: Send keystrokes to login site
I ran your latest script with nothing else included. This time, eTrade opened in a reduced window and I did get the message. after I hit OK I got the blinking cursor in the password field.
Re: Send keystrokes to login site
Okay, so add the send stuff at the bottom of the same script. You can remove the MsgBox line. Always run it as its own script. It can be combined with other hotkeys later after you get it working and know how to properly combine the code.
Re: Send keystrokes to login site
After this partial success, I removed the message and added
before the Return statement.
I still only get the blinking cursor. btw still works if I do it manually.
Code: Select all
send, {down}{down}{enter}{enter}
I still only get the blinking cursor. btw
Code: Select all
send, {down}{down}{enter}{enter}
Re: Send keystrokes to login site
How about if you replace those keys with 123456? Does that get entered into the field?
Re: Send keystrokes to login site
OK, it gets interesting! When I tried 123456, nothing different happened, Then I decided to restore your MsgBox, and ran it again. This time I got 6 characters in the password field, presumably "123456". I thought I might have made a mistake so I ran the scripts again, both with and without the MsgBox. The tests were repeatable, i.e. the password is entered when the MsgBox is present, but not without it.
Re: Send keystrokes to login site
That makes it seem like the delay of having the MsgBox is helping. Try putting in a very long Sleep instead of the MsgBox. Like Sleep, 8000 or something. Maybe the page is slow to fully load and be ready to accept key strokes.
Who is online
Users browsing this forum: Google [Bot] and 228 guests