- I was able to use an Internet Explorer object to navigate to certain internal files (e.g. an hhk file), but not an internal js file. If I try to navigate to an internal js file, it tries to download that file instead of navigate to it and display its plaintext contents. I was wondering if there was some way to get the contents of the js file.
- I'm looking to return to this:
HTML Help alternative via Internet Explorer - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=42129
Code: Select all
q:: ;chm file: get internal file contents (navigate to js file, don't download it)
;note: using vPath1/4 should work
;note: using vPath2/3/5/6 results in an attempt to download rather than display the js file
vDirChm := A_Desktop "\AutoHotkey_1.1.29.00\AutoHotkey" ;assumes the chm file was decompiled (e.g. via 7-Zip)
vPath1 := vDirChm "\Index.hhk"
vPath2 := vDirChm "\docs\static\source\data_index.js"
vPath3 := vDirChm "\docs\static\source\data_toc.js"
vPathChm := A_Desktop "\AutoHotkey_1.1.29.00\AutoHotkey.chm"
vPath4 := "its:" vPathChm "::/Index.hhk"
vPath5 := "its:" vPathChm "::/docs/static/source/data_index.js"
vPath6 := "its:" vPathChm "::/docs/static/source/data_toc.js"
oWB := ComObjCreate("InternetExplorer.Application")
oWB.Visible := True
oWB.Navigate(vPath1)
while oWB.busy || !(oWB.ReadyState = 4)
Sleep, 10
Clipboard := oWB.document.documentElement.outerHTML
;Clipboard := oWB.document.documentElement.innerText
oWB := ""
MsgBox, % "done"
return