↓IEを起動しない方法。
以前もここに貼ったモジュールですが、使えるかと。
#module
#define IID_IDispatch "{00020400-0000-0000-C000-000000000046}"
#define IID_IPersistFile "{0000010b-0000-0000-C000-000000000046}"
#usecom IPersistFile IID_IPersistFile
#comfunc IPersistFile_Load 5 wstr, int
#uselib "urlmon.dll"
#func CreateURLMoniker "CreateURLMoniker" int, wstr, int
#uselib "ole32.dll"
#func BindMoniker "BindMoniker" comobj, int, int, int
#func IIDFromString "IIDFromString" wstr, var
#uselib "kernel32.dll"
#func GetFullPathName "GetFullPathNameA" sptr, int, int, int
#deffunc loadHTML var v, str url
// v = Documentオブジェクトを受け取る変数
// url = ロードするURL(PATH)
dimtype doc, vartype("comobj"), 1
dimtype moniker, vartype("comobj"), 1
dim iid, 4
_url = url
p = ""
getstr p, _url, 0, ':'
if p == "http" {
CreateURLMoniker 0, url, varptr(moniker)
if varuse(moniker) == 0 : return // モニカ作成失敗
IIDFromString IID_IDispatch, iid
BindMoniker moniker, 0, varptr(iid), varptr(doc)
delcom moniker
} else {
exist url
if strsize != -1 {
newcom doc, "htmlfile"
if varuse(doc) {
sdim fullpath, 260
pfilepart = 0
GetFullPathName url, 260, varptr(fullpath), varptr(pfilepart)
IPersistFile_Load doc, fullpath, 0
}
}
}
v = doc
if varuse(doc) {
if doc("readyState") == "uninitialized" : delcom v
delcom doc
}
return
#global
// 使い方 loadHTML 変数, "URL"
/*
loadHTML objDoc, "http://yahoo.co.jp"
if varuse(objDoc) == 0 : dialog "HTMLDocument取得失敗" : end
repeat
wait 10
if objdoc("readyState") == "complete" : break
loop
objBody = objDoc("body")
if varuse(objBody) == 0 : delcom objDoc : end
buf = objBody("innerHTML")
mes buf
delcom objBody
delcom objDoc
stop
*/