ThisMacroName のサポート

ThisMacroName プロパティーを使用すると、実行中のマクロ・ファイル名を取得するスクリプトを実行できるようになります。これは、マクロ・ファイル名を使用するスクリプトを書き込む場合に役立ちます。

次の ThisMacroName の例を参照してください。
[ZIEWin SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=Example of usage of property ThisMacroName
[ZIEWin SCRIPT SOURCE]
OPTION EXPLICIT
Dim sName, sHandle

REM App Main
Main

sub Main()
	'Initialize the session
	autECLConnMgr.autECLConnList.Refresh 
	sName = autECLConnMgr.autECLConnList(1).Name
	sHandle = autECLConnMgr.autECLConnList(1).Handle

	'Connect to the current session
	autECLSession.SetConnectionByName(ThisSessionName)
	sName = autECLSession.Name
	sHandle = autECLSession.Handle

	MsgBox("The current session name :")
	MsgBox(ThisSessionName)
	MsgBox("The macro name is :")
	'Should pop up correct macro file name in the message box
	MsgBox(ThisMacroName)
end sub