(Created $alias identifier - mIRC) |
m ($alias was added in 5.1) |
||
| (6 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| − | '''$alias''' can be used to return the filename of the Nth loaded alias file. If you specify a filename, it returns $null if the file is not loaded; otherwise it returns the file's name. | + | {{mirc title|$alias Identifier}}'''$alias''' can be used to return the filename of the Nth loaded alias 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>$alias(N/filename)</pre> | <pre>$alias(N/filename)</pre> | ||
| − | = Switches = | + | == Switches == |
None | None | ||
| − | = Parameters = | + | == Parameters == |
<span style="display: inline-block; width: 80px;">'''N'''</span>The Nth alias file you want to check. If N is 0, this will return the total number of alias files currently loaded. | <span style="display: inline-block; width: 80px;">'''N'''</span>The Nth alias file you want to check. If N is 0, this will return the total number of alias files currently loaded. | ||
<span style="display: inline-block; width: 80px;">'''filename'''</span>Specify an actual filename if you want to explicitly check if an alias 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 an alias 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 alias files currently loaded to the active window''' | '''Echo the total number of alias files currently loaded to the active window''' | ||
<pre>//echo -a $alias(0)</pre> | <pre>//echo -a $alias(0)</pre> | ||
| Line 22: | Line 23: | ||
<pre>//echo -a $alias(myfile.mrc)</pre> | <pre>//echo -a $alias(myfile.mrc)</pre> | ||
| − | = See also = | + | == Compatibility == |
| − | * | + | {{mIRC compatibility|5.1}} |
| + | |||
| + | == See also == | ||
| + | * {{mIRC|$script}} | ||
| + | {{mIRC identifier list}} | ||
| − | [[Category:mIRC identifiers]] | + | [[Category:mIRC identifiers|alias]] |
Latest revision as of 23:09, 23 August 2021
$alias can be used to return the filename of the Nth loaded alias file. If you specify a filename, it returns $null if the file is not loaded; otherwise it returns the file's name.
Synopsis[edit]
$alias(N/filename)
Switches[edit]
None
Parameters[edit]
NThe Nth alias file you want to check. If N is 0, this will return the total number of alias files currently loaded.
filenameSpecify an actual filename if you want to explicitly check if an alias file is loaded. This will return $null if no file is loaded, otherwise it returns the file name.
Example[edit]
Echo the total number of alias files currently loaded to the active window
//echo -a $alias(0)
Echo the 3rd alias file name to the active window
//echo -a $alias(3)
Echo if myfile.mrc is currently a loaded alias to the active window
//echo -a $alias(myfile.mrc)
Compatibility[edit]
Added: mIRC v5.1
Added on: 28 Aug 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.