[test] 書きこみテスト 専用スレッド 5 [テスト]

このエントリーをはてなブックマークに追加
924名無しさん@お腹いっぱい。
if ( WScript.Arguments.count() ){
var sURL = "http://p2.2ch.io/getf.cgi?" + WScript.Arguments(0);
var oXHR = new ActiveXObject( "Microsoft.XMLHTTP" );
oXHR.open( 'GET', sURL, false );
oXHR.send( null );
var oADS = new ActiveXObject("ADODB.Stream");
with( oADS ){
Type = 1;
Open();
Write( oXHR.responseBody );
Position = 0;
Type = 2;
Charset = 'Shift_JIS';
}
var sRsvData = oADS.Readtext;
oADS.Close;
oADS = null;
if ( sRsvData.indexOf( "<div>キーワード【 準備中 】</div>" ) != -1 ) alert( "準備中" );
else {
var sTemp = sRsvData.match( /<a href="http:\/\/find\.2ch\.net\/.*?>.+?<\/a>/g );
var aKeywords = new Array(), sKeywords = "";
aKeywords = String( sTemp ).split( "," );
sKeywords = aKeywords[0].match( /<a href="http:\/\/find\.2ch\.net\/.*?>(.+?)<\/a>/ )[1];
for ( i = 1; i < aKeywords.length; i++ ) {
sKeywords += "\n" + aKeywords[i].match( /<a href="http:\/\/find\.2ch\.net\/.*?>(.+?)<\/a>/ )[1]
}
alert( sKeywords );
}
}
function alert ( s ) { return new ActiveXObject( "WScript.Shell" ).popup( s, 0, "Keywords", 4096 ); }