Enter text into Chrome Text Field (possibly via Placeholders in the HTML?) Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
reboot689
Posts: 19
Joined: 10 Apr 2017, 14:49

Enter text into Chrome Text Field (possibly via Placeholders in the HTML?)

17 May 2017, 13:02

I have a web application I have to log into every day, and it only works in Google Chrome. So my solution must be via Chrome, IE won't work. I need to find and type username and pw into the text fields. I thought maybe looking for the placeholders in the HTML may help? I could likely select the text fields via mouse, but that's a bit slow and sloppy. The username field is also the first text box on the page, and password field the last. So if I could find the username field I can then tab to the password field.

Can somebody help me with this venture? I haven't found anything on this. so far.
reboot689
Posts: 19
Joined: 10 Apr 2017, 14:49

Re: Enter text into Chrome Text Field (possibly via Placeholders in the HTML?)  Topic is solved

23 Feb 2018, 14:23

This is what i came up with. Its not perfect as it relies on the Chrome tab always being in the Number 3 spot, And often ends up replacing the URL with my login info. But it works as intended, the first time, about 80% of the time. If it fails. i just reload the page and click the username line. and run the script.

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

^!Numpad9::
WinActivate SIMPL - Synchronous Inventory Management and Provisioning
WinActivate ahk_class Chrome_WidgetWin_1
Sendplay, ^3
WinWait SIMPL - Synchronous Inventory Management and Provisioning
Send, User{Tab}Passwd{Enter}
Return
User avatar
gregster
Posts: 1381
Joined: 30 Sep 2013, 06:48

Re: Enter text into Chrome Text Field (possibly via Placeholders in the HTML?)

23 Feb 2018, 19:52

Chrome doesn't have a COM interface, so it get's more complicated. You can probably get close with this: https://autohotkey.com/boards/viewtopic.php?f=6&t=42890

Return to “Ask For Help”

Who is online

Users browsing this forum: Exaskryz, london1888, swagfag and 82 guests