m (Bot: de-linking old mIRC menu) |
Maroonbells (talk | contribs) (update new switch) |
||
Line 1: | Line 1: | ||
{{mirc title|/load Command}} | {{mirc title|/load Command}} | ||
− | The '''/load command''' can be used to load any type of existing file | + | The '''/load command''' can be used to load any type of existing file of the types: 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 {{mIRC|/reload}} command, /load will trigger the ON LOAD and ON START events. |
== Synopsis == | == Synopsis == | ||
− | /load -a <filename> | + | /load -a[N] <filename> |
/load -p<scqnm> <filename> | /load -p<scqnm> <filename> | ||
− | /load -r< | + | /load -r<uvs[N]> <filename> |
== Switches == | == Switches == | ||
Line 17: | Line 17: | ||
* '''-rvN''' - load variable file | * '''-rvN''' - load variable file | ||
* '''-ruN''' - load users file | * '''-ruN''' - load users file | ||
− | * '''-N''' - if you specify the N value with - | + | * '''-N''' - if you specify the N value with -rs or -a, it loads the file into the Nth position in the script list or alias list. In the absence of N, the file is loaded into the last position. |
== Parameters == | == Parameters == | ||
* '''<filename>''' - The script file to load | * '''<filename>''' - The script file to load | ||
− | + | '''Note:''' In the absence of a path, assumes the file is located in $mircdir. Paths not beginning with drive letter or \ are relative to the location of $mircdir.<br /> | |
+ | '''Note:''' You can have samefilename.mrc and scripts\samefilename.mrc loaded at the same time. Do NOT load any script located in the downloads folder where someone can resume-send a script file on top of the file you have already loaded. | ||
+ | '''Note:''' default aliases file is aliases.ini and default popups file is popups.ini containing all 5 types of popups. Default setup has both filenames in scripts\ subfolder from $mircdir. | ||
== Example == | == Example == | ||
Load three remote script files. | Load three remote script files. | ||
Line 29: | Line 31: | ||
load -rs baz.mrc | load -rs baz.mrc | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
+ | |||
+ | Loads script file into the 2nd position of the 'view' menu in Alt+R editor. If it's already loaded, moves the file to that position. If contains ON LOAD or ON START event handler, this triggers the Initialization Warning and/or performs the event handler. | ||
+ | <syntaxhighlight lang="mIRC">load -rs2 foobar.mrc</syntaxhighlight> | ||
+ | |||
+ | Loads aliases file into the 1st position of the 'view' menu in Alt+D editor. If it's already loaded, moves the file to that position. | ||
+ | <syntaxhighlight lang="mIRC">load -a1 C:\Foldername\aliases.mrc</syntaxhighlight> | ||
Load a variables and a users file: | Load a variables and a users file: | ||
Line 35: | Line 43: | ||
load -rv vars2.ini | load -rv vars2.ini | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
+ | |||
+ | '''Note:''' If your aliases.ini was saved to a different file extension such as .mrc, it still needs to have the same scripting format used with the original filename. The only difference is that the disk file no longer is saved in the .ini format with lines beginning like n123=. Same applies with saving your users.ini and vars.ini files to other filetypes. However without the file extension being .ini, it's not possible to edit the 5 types of popups sharing the same filename, and -ru and -rv can't share the same filename either. | ||
== Compatibility == | == Compatibility == | ||
{{mIRC compatibility|3.8}} | {{mIRC compatibility|3.8}} | ||
− | |||
== See also == | == See also == | ||
− | + | {{collist | |
− | * | + | |count = 3 |
+ | |style = width: 80%; display: inherit; | ||
+ | | | ||
+ | * {{mIRC|$script}} | ||
* {{mIRC|$script}} | * {{mIRC|$script}} | ||
* {{mIRC|$window}} | * {{mIRC|$window}} | ||
Line 51: | Line 63: | ||
* {{mIRC|/unload}} | * {{mIRC|/unload}} | ||
* {{mIRC|/window}} | * {{mIRC|/window}} | ||
− | + | }} | |
− | |||
− |
Revision as of 15:28, 30 November 2018
The /load command can be used to load any type of existing file of the types: 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.
Synopsis
/load -a[N] <filename> /load -p<scqnm> <filename> /load -r<uvs[N]> <filename>
Switches
- -a - load aliases file
- -pm - load menubar popups file
- -pn - load nicklist popups file
- -pq - load query popups file
- -pc - load channel popups file
- -ps - load status window popups file
- -rsN - load remote script file
- -rvN - load variable file
- -ruN - load users file
- -N - if you specify the N value with -rs or -a, it loads the file into the Nth position in the script list or alias list. In the absence of N, the file is loaded into the last position.
Parameters
- <filename> - The script file to load
Note: In the absence of a path, assumes the file is located in $mircdir. Paths not beginning with drive letter or \ are relative to the location of $mircdir.
Note: You can have samefilename.mrc and scripts\samefilename.mrc loaded at the same time. Do NOT load any script located in the downloads folder where someone can resume-send a script file on top of the file you have already loaded.
Note: default aliases file is aliases.ini and default popups file is popups.ini containing all 5 types of popups. Default setup has both filenames in scripts\ subfolder from $mircdir.
Example
Load three remote script files.
alias load_remote { load -rs foo.mrc load -rs bar.mrc load -rs baz.mrc }
Loads script file into the 2nd position of the 'view' menu in Alt+R editor. If it's already loaded, moves the file to that position. If contains ON LOAD or ON START event handler, this triggers the Initialization Warning and/or performs the event handler.
load -rs2 foobar.mrc
Loads aliases file into the 1st position of the 'view' menu in Alt+D editor. If it's already loaded, moves the file to that position.
load -a1 C:\Foldername\aliases.mrc
Load a variables and a users file:
alias load_vars_and_users { load -ru users2.ini load -rv vars2.ini }
Note: If your aliases.ini was saved to a different file extension such as .mrc, it still needs to have the same scripting format used with the original filename. The only difference is that the disk file no longer is saved in the .ini format with lines beginning like n123=. Same applies with saving your users.ini and vars.ini files to other filetypes. However without the file extension being .ini, it's not possible to edit the 5 types of popups sharing the same filename, and -ru and -rv can't share the same filename either.
Compatibility
Added: mIRC v3.8
Added on: 25 Nov 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.