/* SKKFEP使ってるとよくCD-ROMを取り出したくなりますよね ならないとしたら、今すぐこのゲートの導入をやめて病院に行ってくだしあ つかいかた 実行して「eject」を変換 β0+11i対応版 */ myself = 0 ///< 自分のゲート番号 (ゲート0: フロントエンドからの要求) target = 1 ///< 接続先ゲート番号 (ゲート1: 辞書プロセスへの処理依頼) Gate = new ActiveXObject("SKKGate"), Shell = new ActiveXObject("WScript.Shell") // メイン for (;;) { // 待機 id = Gate.Sync(myself) // 終了 (停止要求 -1 / 二重起動 -2) if (id < 0) { if (id == -2) { Shell.Popup("停止します") Gate.Sync(-1, myself) } break } index = Gate.Get() cand = Gate.Get(1) attr = Gate.Get(2) switch (id) { // 変換 case 0: if (index == "eject" && attr == 0) { with (new ActiveXObject("WMPlayer.OCX").cdromCollection) { for (var i = 0; i < Count; i++) Item(i).Eject() } Gate.Put("で、出――") break } result = Gate.Search(index, attr, target).split(/\3|$/) for (i in result) Gate.Put(result[i]) break // 自動 default: Gate.Exec(target) break } }