From WikiChip
mirc/identifiers/$script
< mirc‎ | identifiers
Revision as of 00:25, 23 June 2014 by Zmodem (talk | contribs) (Created $script identifier - mIRC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

$script can be used to return the filename of the Nth loaded script file. If you specify a filename, it returns $null if the file is not loaded; otherwise it returns the file's name.

Synopsis

$script(N/filename)

Switches

None

Parameters

NThe Nth script file you want to check. If N is 0, this will return the total number of script files currently loaded.

filenameSpecify an actual filename if you want to explicitly check if a script file is loaded. This will return $null if no file is loaded, otherwise it returns the file name.

Example

Echo the total number of script files currently loaded to the active window

//echo -a $script(0)

Echo the 2nd script file name to the active window

//echo -a $script(2)

Echo if myfile.mrc is currently a loaded script to the active window

//echo -a $script(myfile.mrc)

See also