|
ちなみにですが、HmJre.dllを呼び出すマクロの方は、特にメモリリークは起きない
ようでした。マクロのサンプルも念のため書きます。
$uri1 = "http://hidemaru.interlink.or.jp/";
call HttpGet $uri1;
$html = $$return;
#count = 0;
Loop:
#count = #count + 1;
title str(#count);
loaddll "hmjre.dll";
##n = dllfunc("SetUnicodeIndexAutoConvert", 1);//unicode文字による桁ずれ
を解消
$text = "∫可能性が高かった(ハザード比,それぞれ 1.90 [95% CI 1.12〜3.2
1] と 2.02 [95% CI 1.13〜3.58])\n∬more likely to rupture (hazard ratio, 1.
90 [95% CI, 1.12 to 3.21] and 2.02 [95% CI, 1.13 to 3.58], respectively). \n
∫ブレブもまた,可能性が高かった(ハザード比 1,234.63;95% CI 1.08〜2.48).
\n∬also more likely to rupture hazard ratio, 1234.63; 95% CI, 1.08 to 2.48
\n\n∫結 論:この研究.\n∬ Conclusions:aneurysm. \n∬(Funded by the Ministr
y of Health, Labor, and Welfare in Japan and others; 333 UCAS Japan UMIN-CTR
Pass number, C000000 418 \n∫(厚生労働省ほかから研究助成を 333 件受けた.\
n∫悉皆調査番号:C000000 418 \n";
#rand = tickcount % 100;
#n = dllfunc("FindRegular", "∬.+?\n", $text, #rand);
#n = dllfunc("FindRegular", "∫.+?\n", $text, #rand);
#n = dllfunc("GetLastMatchLength");
$s = dllfuncstr("ReplaceRegular","(∫.+?\n∬.+?)\n([^∬]*?)∬(.+?\n)",$t
ext,#top,"\\1 ∇\\3\\2",0);
$s = dllfuncstr("ReplaceRegular","(∫.+?)\n([^∫]*?)∫(.+?\n)",$text,#to
p,"\\1 ∇\\3\\2",0);
$s = dllfuncstr("ReplaceRegular", "(∫.+?\n)(∫.+?\n)(∬.+?\n)", $text,
0,"\\1\\3\\2", 0);
$$1 = $html;
$$1 = dllfuncstr("ReplaceRegular","(?<=</TITLE>)[^~]+?(?=(- 背|背 景))",
$$1, 0, "", 2);
$$1 = dllfuncstr("ReplaceRegular","</TABLE>[^~]+", $$1, 0, "", 2);
$$1 = dllfuncstr("ReplaceRegular","\r?\n", $$1, 0, "", 2);
$$1 = dllfuncstr("ReplaceRegular","> +<", $$1, 0, "", 2);
$$1 = dllfuncstr("ReplaceRegular"," +", $$1, 0, " ", 2);
$$1 = dllfuncstr("ReplaceRegular"," +", $$1, 0, " ", 2);
$$1 = dllfuncstr("ReplaceRegular","(</TITLE>)", $$1, 0, "\\1\n", 2);
$$1 = dllfuncstr("ReplaceRegular","(<.*?/TD/.*?>|</TD>)", $$1, 0, "\\1\n
", 2);
goto Loop;
HttpGet:
#http = createobject("Msxml2.XMLHTTP");
if (!#http) #http = createobject("Microsoft.XMLHTTP");
if (!#http) {message "オブジェクトの生成に失敗しました"; endmacro;}
callmethod #http, "Open", "GET", $$1, false;
callmethod #http, "Send";
$$html = getpropstr(#http, "ResponseText");
releaseobject #http;
return $$html;
|
|