xml version="1.0" encoding="shift_jis"
<job>
<object id="$ie" progid="InternetExplorer.Application"/>
<object id="$shell" progid="WScript.Shell"/>
<object id="$msg" progid="CDO.Message"/>
<object id="$fso" progid="Scripting.FileSystemObject"/>
<reference object="Scripting.FileSystemObject"/>
<script language="JScript"><![CDATA[
(function() {
var cdo = 'http://schemas.microsoft.com/cdo/configuration/';
var smtp = 'smtp.example.org', to = 'kageroh@example.org', from = to;
var url = 'http://example.org/gonyogonyo.html';
$ie.visible = true;
$ie.navigate(url); while ($ie.readyState !== 4);
$shell.sendKeys('^%\\'); WSH.sleep(4 * 1000);
var f = $fso.createTextFile('a.html', true, false);
f.write($ie.document.getElementsByTagName('html')[0].innerHTML);
$ie.quit();
f.close();
$shell.run('%comspec% /c diff -u b.html a.html > ' + (f = 'rct.diff'), 0, true);
f = $fso.openTextFile(f, forReading, false, tristateUseDefault);
try { $msg.textBody = f.readAll(); } catch (e) { f.close(); return; }
f.close();
$fso.copyFile('a.html', 'b.html', true);
$msg.to = to;
$msg.from = from;
$msg.subject = 'rct.';
$msg.configuration.fields.item(cdo + 'sendusing') = 2;
$msg.configuration.fields.item(cdo + 'smtpserver') = smtp;
$msg.configuration.fields.item(cdo + 'smtpserverport') = 25;
$msg.configuration.fields.update();
$msg.send();
})();
]]></script>
</job>
- diff
- http://www.fsci.fuk.kindai.ac.jp/kakuto/soft.html