From WikiChip
Difference between revisions of "mirc/identifiers/$script"
< mirc‎ | identifiers

(Created $script identifier - mIRC)
 
m
Line 1: Line 1:
 
'''$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.
 
'''$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 =
+
== Synopsis ==
 
<pre>$script(N/filename)</pre>
 
<pre>$script(N/filename)</pre>
  
= Switches =
+
== Switches ==
 
None
 
None
  
= Parameters =
+
== Parameters ==
 
<span style="display: inline-block; width: 80px;">'''N'''</span>The Nth script file you want to check. If N is 0, this will return the total number of script files currently loaded.
 
<span style="display: inline-block; width: 80px;">'''N'''</span>The Nth script file you want to check. If N is 0, this will return the total number of script files currently loaded.
  
 
<span style="display: inline-block; width: 80px;">'''filename'''</span>Specify 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.
 
<span style="display: inline-block; width: 80px;">'''filename'''</span>Specify 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 =
+
== Example ==
 
'''Echo the total number of script files currently loaded to the active window'''
 
'''Echo the total number of script files currently loaded to the active window'''
 
<pre>//echo -a $script(0)</pre>
 
<pre>//echo -a $script(0)</pre>
Line 22: Line 22:
 
<pre>//echo -a $script(myfile.mrc)</pre>
 
<pre>//echo -a $script(myfile.mrc)</pre>
  
= See also =
+
== See also ==
 
* [[$alias identifier - mIRC|$alias]]
 
* [[$alias identifier - mIRC|$alias]]
  
 
[[Category:mIRC identifiers]]
 
[[Category:mIRC identifiers]]

Revision as of 15:30, 23 June 2014

$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