ThisMacroName support
The ThisMacroName property is used to enable a running script to obtain the name of the macro file that is running. This is useful when writing a script that will be using the name of the macro file.
See the following example of 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