05/12/01 21:07:02 gpAo7X5K0
/* F1: キーワードヘルプ */
f.onKeyF1 = function (arg, classname, methodname) {
invoke(arg, this.parent, methodname);
var c = App.Caret;
var Keyword = "";
var HelpFile = " " + "C:/dlapp/moeditor/doc/contents.chm";
var KeyHH = "KeyHH -#klink" + " ";
// ヘルプの存在をチェック
var fs = new ActiveXObject("Scripting.FileSystemObject");
if(! fs.FileExists(HelpFile)) {
App.Alert("ヘルプの指定が不正です");
return;
}
if(App.Caret.Selection.Mode == 0) {
// カーソル位置の単語を取得
Keyword = GetWordAtCaret();
} else {
Keyword = c.Selection.Text;
}
// ヘルプ起動
var wsh = new ActiveXObject("WScript.Shell");
wsh.run(KeyHH + Keyword + HelpFile );
}
GetWordAtCaretについてはHSPクラスをみてください
>>988
thx