//産経ニュースの主張と産経抄をGET
editor.newFile();
OutputBar.clear();
OutputBar.Visible = true;
OutputBar.writeln(“産経ニュース取得中…”);
Redraw = false;
var http = new ActiveXObject(“Msxml2.XMLHTTP.6.0″);
http.onreadystatechange = function() {
if (http.readyState == 4 && http.status == 200) {
BinaryToText(http.responseBody,”utf-8”);
}
}
http.open(“GET”, “http://sankei.jp.msn.com/column/topicslist/column-t.htm”, false);
http.send(“”);//社説のアドレスを検索
var nFlags = eeFindNext|eeFindReplaceQuiet;
var strURL = “http://sankei.jp.msn.com/column/topicslist/”;
var strADR1 = “”;
var strADR2 = “”;
document.selection.StartOfDocument();
if (document.selection.Find(“主張
..*”>もっと読む”,nFlags | eeFindReplaceRegExp)) {
document.selection.CharRight();
//最初に見つかったリンクをGET
if (document.selection.Find(“【主張】”,nFlags)) {
document.selection.CharLeft();
xEnd = document.selection.GetActivePointX(eePosLogicalA);
yEnd = document.selection.GetActivePointY(eePosLogical);
document.selection.SetActivePoint(eePosLogicalA,xPos,yPos);
document.selection.SetAnchorPoint(eePosLogicalA,xPos,yPos);
document.selection.SetActivePoint(eePosLogicalA,xEnd,yEnd,true);
strADR1 = strURL + document.selection.Text;
//産経抄のアドレス検索
document.selection.StartOfDocument();
if (document.selection.Find(“産経抄
..*”>もっと読む“,nFlags | eeFindReplaceRegExp)) {
document.selection.CharRight();
//最初に見つかったリンクをGET
if (document.selection.Find(“【産経抄】”,nFlags)) {
document.selection.CharLeft();
xEnd = document.selection.GetActivePointX(eePosLogicalA);
yEnd = document.selection.GetActivePointY(eePosLogical);
document.selection.SetActivePoint(eePosLogicalA,xPos,yPos);
document.selection.SetAnchorPoint(eePosLogicalA,xPos,yPos);
document.selection.SetActivePoint(eePosLogicalA,xEnd,yEnd,true);
strADR2 = strURL + document.selection.Text;
}
}
}
OutputBar.writeln(“社説データ取得中…”);
ss = new ActiveXObject(“Msxml2.XMLHTTP.6.0″);
ss.onreadystatechange = function() {
if (ss.readyState == 4 && ss.status == 200) {
document.selection.SelectAll();
document.selection.Delete();
BinaryToText(ss.responseBody,”utf-8”);
}
}
ss.open(“GET”, strADR1, false);
ss.send(“”);
document.selection.StartOfDocument();
//先頭削除
Trim_Data(“”,”