From WikiChip
$script identifier - mIRC
< mirc‎ | identifiers

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

Synopsis[edit]

$script(N/filename)

Switches[edit]

None

Parameters[edit]

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[edit]

Echo script files this identifier is being called from:

alias test {
  echo -a $script
}
/test

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[edit]

[Expand]
v · d · e mIRC identifier list