Send text to <input> value

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rynsp8
Posts: 46
Joined: 30 Jan 2018, 12:45

Send text to <input> value

23 Mar 2018, 14:41

So, I need to send text to an input field in an HTML page that doesn't use ID or CLASS. This HTML page doesn't use ID or CLASS anywhere.

I've been able to select the <input> element a few ways:

Code: Select all

1)  pwb.document.getElementsByTagName("input")[18].value
2)  pwb.document.GetElementsByName("FindText")[0].Value
3)  pwb.document.FindDlg.FindText.value
The input exists within a form: Html>Body>form>table>tbody>tr>td>font>input

Again, none of the higher elements, or even the <input> element contain an ID or CLASS. I can type something in and get the value to return in a MsgBox, but I can't get AHK to send a value to the text field.

I've tried sending multiple tab commands, as I can get the cursor to appear after hitting tab roughly 7-8 times. But the tab commands don't send as I'm expecting them to.

Code: Select all

SendInput, {tab}
from within the javascript console I can use all the above commands and it will change the <input> value to whatever I want it to:

Code: Select all

1)  pwb.document.getElementsByTagName("input")[18].value = "something"
2)  pwb.document.GetElementsByName("FindText")[0].Value = "something else"
3)  pwb.document.FindDlg.FindText.value = "something elser"
but AHK seems to be having issue... or rather, I'm having an issue with it.

Help?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ishida20 and 406 guests