Script(Ver1.88対応版)
Index

ブックマークツールにスクリプトを指定できます。
ブックマークやツールのパスの部分の記述によって秀丸ファイラーClassic独自のオブジェクトが使えるスクリプトにできます。
JScript/VBScriptのスクリプトエンジンを利用できます。

スクリプトファイルはどこに置いてもいいです。
スクリプトライブラリから入手したスクリプトファイルがある場合、ブックマークまたはツールのプロパティの「パス」の入力欄の右側に「>>」ボタンがあり、ここから「スクリプトの参照...」でスクリプトファイルを選ぶと簡単です。
You can specify scripts for bookmarks and tool items.
It becomes a script by describing the part of the path.
You can use the JScript / VBScript script engine.


記述方法

パスの先頭に書く文字列
「js:」→JScriptを利用
「vbs:」→VBScriptを利用
例:「vbs:message "test"」
例:「js:message("test");」

「:」の後に書く文字列
スクリプトを直接記述できます。直接記述の場合は記述できる文字数には限界があります。
例:「js:message("a");open("c:\\");」

ファイル名を記述するとファイルを参照します。
スクリプトファイルのエンコーディングはShift-JISまたはUnicode(UTF-16,LE,BOMあり)をサポートしています。
例:「js:C:\folder\test.js」

ファイル名を「.\」に続いて書くとHmFilerClassic.exeからの相対パスになります。(V1.36)
例:「js:.\Sub\test.js」

スクリプトファイル名に続いて空白で区切って、getArgで取得できるパラメータを記述できます。(V1.44)
例:「js:"C:\folder\test.js" param1 "param 2"」

大文字小文字の区別は無く使用できますが、V1.78で、ヘルプ上の表記を最初が小文字のキャメルケースに変更しました。

Description method

String at the beginning of the path
If you write "js:" JScript will be used.
If you write "vbs:" VBScript will be used.
Example: vbs:message "test"
Example: js:message("test");

String to write after ":"
You can write scripts directly. In the case of direct description, there is a limit to the number of characters that can be described.
Example: js:message("a");open("c:\\");
References a file when describing the file name.
Example: vbs:C:\folder\test.vbs
Example: js:C:\folder\test.js
You can describe parameters by separating the script file name with a space. (V1.44)
Parameters can be get with the getArg method.
Example: js:"C:\folder\test.js" param1 "param 2"


オブジェクトの説明
strは文字列、numは数値、[]は省略可。
bool値はvbsとjsで値が違うので原則使いません。真偽を表す場合は数値で1が真、0が偽としています。
Object description
str is string, num is number, [] is optional.
When it is true or false, 1 is true and 0 is false.

Global
You can write as it is without writing an object.
Global method
Global property


Config object
Config object

ConfigSystem object
ConfigSystem object


DllFuncManager object
DllFuncManager object

Other
「WScript」というオブジェクトは無いです。
他のオブジェクト作成は CreateObject が使えます。
(V1.86未満では、JScriptはnew ActiveXObjectにする必要があります)
「js:」は「jscript:」または「javascript:」と書いてもいいです。
「vbs:」は「vbscript:」と書いてもいいです。

「script:」と書いてファイル指定時は拡張子に関連付けされているスクリプトエンジンを利用します。
例:「script:C:\folder\test.vbs」
例:「script:C:\folder\test.js」
(他のスクリプトエンジンは動作確認はしていないです)

スクリプトの例
There is no object called "WScript".
Other objects can be created using CreateObject.
You can write "js:" as "jscript:" or "javascript:".
You can write "vbs:" as "vbscript:".

When "script:" is written, when specifying a file, the script engine associated with the extension is used.
Example: "script: C:\folder\test.vbs"
Example: "script: C:\folder\test.Js"

Script example