Thanks! That works great.
EDIT: It worked when I plugged it into my driver, but not in my actual script. Here's what I've done so far. I'm sure there's a more COM-efficient way to do this, but I prefer to parse the HTML.
Relevant code is the
ChangeLabels: sub.
OnExit, ExitSub
Gui, Add, Button, gChangeLabels Default, Label Website Fields
; URL Prompt, is displayed first
Gui, 2: Margin, 0, 0
Gui, 2: Add, Picture, w300 h100, Web.jpg
Gui, 2: Font, s14
Gui, 2: Add, Edit, vURL +BackgroundTrans x30 y30 w240, http:://
Gui, 2: Add, Button, x500 y150 gEnterURL Default, Hidden_Button
Gui, 2: Show, w300 h100, Enter the URL
return
EnterURL:
Gui, 2: Submit
pwb := ComObjCreate("InternetExplorer.Application")
pwb.Silent := true
pwb.Navigate(URL)
Gui, 1: Show
return
StartOver:
pwb.Quit()
pwb =
Gui, Hide
Gui, 2: Show, w300 h100, Enter the URL
return
[color=red]ChangeLabels:[/color]
While pwb.Busy = true
Sleep, 100
;Traytip, t, t ; Edit2: Commented this out, this just showed that it gets past checking if pwb is busy
HTML := pwb.Document.body.innerhtml
N = <input[^\r\n]*?id="\K[^"]*
pos := 0
While Pos := RegExMatch(HTML, N, Match, Pos + 1)
Msgbox "%Match%"
return
ExitSub:
pwb.Quit()
pwb =
ExitApp
return
If you want to test, should work on autohotkey.net.