- If I do something like:
oWB.Navigate("https://autohotkey.com/docs/commands/Run.htm#Related")
That will work the first time. But if I scroll away from that point and execute that line again, it won't jump back.
- I have a workaround below, but I wondered if there was a more direct approach. Thanks.
Code: Select all
;WBGet function - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=39869
;e.g. url
;Run / RunWait - Syntax & Usage | AutoHotkey
;https://autohotkey.com/docs/commands/Run.htm
q:: ;internet explorer - jump to fragment identifier
WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)
vUrl := RegExReplace(oWB.document.url, "#.*")
if InStr(oWB.document.url, "#Related")
{
oWB.Navigate(vUrl "#")
while oWB.busy || !(oWB.ReadyState = 4)
Sleep, 10
}
oWB.Navigate(vUrl "#Related")
oWB := ""
return