Scripting Scripts » History » Revision 1
Revision 1/3
| Next »
Per Amundsen, 02/26/2017 04:35 PM
- Table of contents
- Scripts
Scripts¶
/load¶
Added in 1.9.0
/load -aN <filename>
/load -bcmnpqs <filename>
/load -rsuv <filename>
The /load command can be used to load any type of existing file including: aliases, popups, remote, users, and variables. Using /load on an already loaded file will update its contents while maintaining its order among other files.
Note that unlike the /reload command, /load will trigger the on LOAD and on START events.
See also /reload, /unload, on LOAD, on UNLOAD, on START.
Switches
Switch | Description |
-aN | loads an aliases file, if N is specified, load into the Nth position in the alias list. |
-b | Loads a nicklist buttons file. (AdiIRC only) |
-ps | Loads a status popup file. |
-pc | Loads a channel popup file. |
-pq | Loads a query popup file. |
-pn | Loads a nicklist popup file. |
-pm | Loads a Menubar popup file. |
-pe | Loads a channel link popup file. (AdiIRC only) |
-pi | Loads a link popup file. (AdiIRC only) |
-ru | Loads a user list file. |
-rv | Loads a variables file. |
-rsN | Loads a remote scripts file, if N is specified, load into the Nth position in the script list. |
Parameters
Parameter | Description |
<filename> | Filename to load. |
/reload¶
Added in 1.9.0
/reload -aN <filename>
/reload -bcmnpqs <filename>
/reload -rsuv <filename>
The /reload command can be used to reload any type of existing file including: aliases, popups, remote, users, and variables. Using /reload on an already loaded file will update its contents while maintaining its order among other files. Note that unlike the /load command, /reload will not trigger the on LOAD and on START events.
See also /load, /unload, on LOAD, on UNLOAD, on START.
Switches
Switch | Description |
-aN | loads an aliases file, if N is specified, load into the Nth position in the alias list. |
-b | Loads a nicklist buttons file. (AdiIRC only) |
-ps | Loads a status popup file. |
-pc | Loads a channel popup file. |
-pq | Loads a query popup file. |
-pn | Loads a nicklist popup file. |
-pm | Loads a Menubar popup file. |
-pe | Loads a channel link popup file. (AdiIRC only) |
-pi | Loads a link popup file. (AdiIRC only) |
-ru | Loads a user list file. |
-rv | Loads a variables file. |
-rsN | Loads a remote scripts file, if N is specified, load into the Nth position in the script list. |
Parameters
Parameter | Description |
<filename> | Filename to (re)load. |
/unload¶
Added in 1.9.0
/unload <-anrs> <filename>
Unloads the specified alias or remote script file.
See also /load, /reload, on LOAD, on UNLOAD, on START.
Switches
Switch | Description |
-a | Unload a alias file. |
-n | Prevents the script from having the on UNLOAD event triggered. |
-rs | Unload a remote script. |
Parameters
Parameter | Description |
<filename> | File to unload. |
/alias¶
Added in 1.9.0
/alias [-l] [filename] <aliasname> <command>
Add/remove/replace any single or multi line (AdiIRC only) alias.
Switches
Switch | Description |
-l | Adds a local alias only available from current script. |
Parameters
Parameter | Description |
[filename] | An optional alias filename to update, if no filename is specified it will use the first match or the first loaded alias file. |
<aliasname> | Name of the alias to add/remove/replace. |
<command> | The command(s) to be executed by the aliasname. |
Example
; This will replace the first matching alias with the new command. /alias /hello /me says hello ; To remove an existing alias: /alias /hello ; If you want to add/remove/replace a alias in an existing file /alias hello.txt /alias /me says hello
$alias¶
Added in 1.9.4
$alias(N/filename)
Returns the filename for the Nth loaded alias file or if you specify a filename, it returns $null if the file is not loaded.
Parameters
Parameter | Description |
N/filename | Nth alias or alias filename. |
Example
; Print number of alias files. //echo -ag $alias(0) ; Print first alias file. //echo -ag $alias(1) ; Check if aliases.ini is loaded. //echo -ag aliases.ini is $iif($alias(aliases.ini),loaded, not loaded)
$script¶
Added in 1.9.0
$script
Returns the filename for the current running script.
$script(N|filename)
Returns the filename for the Nth loaded script file. If you specify a filename, it returns $null if the file is not loaded.
Parameters
Parameter | Description |
N|filename | The filename to check, if N = 0 number of filenames, otherwise the Nth filename. |
Properties
Property | Description |
.ignore | Returns $true if the loaded script is ignored in the Script Editor, otherwise $false. (AdiIRC only) |
Example
; Print number of filename. //echo -ag $script(0) ; Print the first filename. //echo -ag $script(1) ; Check if 'example.ini' is loaded. //echo -ag $script(example.ini)
$scriptdir¶
Added in 1.9.0
$scriptdir
Returns the directory of the currently executing script.
Can be used inside text without being surrounded by white spaces..
Example
; Print the script directory. //echo -ag current scriptdir is $scriptdir ; Print the script directory inside text. //echo -ag $scriptdir\somefile.ini
$scriptline¶
Added in 1.9.0
$scriptline
Returns line number in current script.
Example
; Create a alias alias Example { echo -ag Line number for this line is $scriptline } ; Call the alias /example
Updated by Per Amundsen almost 8 years ago · 1 revisions