WSHならIEを操作することも出来ます。
ienavi.js
//--- Internet Explorerオブジェクトの取得
var IE = WScript.CreateObject("InternetExplorer.Application");
//IE.Width = 640;
//IE.Height = 480;
IE.Visible = true;
//
//--- 指定したURLのホームページを表示する
do {
IE.Navigate("http://www.goo.ne.jp/");
WaitForLoad();
WScript.Sleep(25000);
} while (true);
function WaitForLoad(msec) {
var wait = (new Date()).getTime() + msec;
while ((new Date()).getTime() <= wait);
while (IE.busy);
while (IE.Document.readyState != "complete");
}
** デスクトップのIEをショートカット化して閉じるスクリプト
私は、IEを何十枚も開きっぱなしにしておくことがあります。OSの再起動がしたいとき等に困っちゃうので、開いている全てのIEをURLショートカットにするスクリプトを作ってみました。
&ref(ShortCutter.js);
参考URL
- http://member.nifty.ne.jp/aya/wsh/wsh23.htm
- http://www.roy.hi-ho.ne.jp/mutaguchi/wsh/object/ie.htm