Scripting Commands » History » Revision 128

Revision 127 (Per Amundsen, 02/10/2016 01:14 PM) → Revision 128/198 (Per Amundsen, 02/25/2016 12:02 PM)


 h1. Scripting Commands 

 Parameters in [x] means they are optional. 
 Parameters in <x> means they are required. 
 Parameters with a x|y means either x or y can be used. 

 Click on a command to read more about it. 

 Commands in bold is AdiIRC only. 

 | [[/abook]] 
  | [[/comlist]] 
  | [[/ebeeps]] 
  | [[/ialmark]] 
  | *[[/options]]* 
  |^. *[[/search]]* 
  |^. *[[/txt2bin]]* 

 h1. System information Commands 

 Output from these are set in [[Options_Dialog|Options]] -> [[Options_Sysinfo|Sysinfo]] and are merely convenient aliases. 


 h1. Missing Commands 


 h1. Evaluate identifiers from Editbox 

 Typing a command in the Editbox with double slashes// will evaluate $identifiers in the line before running it. 
 E.g //echo -ag My nick is $me 

 You can also [[tabcomplete]] identifiers manually using $me<tab>. 

 h1. Creating a new command 

 You can create a new command by opening the menu Tools -> Edit Aliases. 

 The format for the command is <command> <script to execute>. 


 ; Creates a new command '/p' which will evaluate and then execute the script '/part $chan'. 
 /p /part $chan 

 You can also add a command from the script editor, the syntax there is alias <command> <script to execute> 


 ; Creates a new command '/p' which will evaluate and then execute the script '/part $chan'. 
 ; Same as previous example. 
 alias p /part $chan 

 If you want to use scripts with multiple lines, you can enclose them with {} brackets in both Edit Aliases and Script Editor. 

 ; Edit Aliases 
 /p { 
   /echo -ag I am parting $chan 
   /part $chan 

 ; Script editor 
 alias p { 
   /echo -ag I am parting $chan 
   /part $chan 

 Almost all built-in commands can be overridden to execute your own script. 


 ; Create your own /part command 
 alias part { 
   /echo -ag I am parting $chan 
   raw PART $chan 

 ; Create your own /part command, but execute the built-in /part command after executing your own script. 
 alias part { 
   /echo -ag I am parting $chan 

   ; Execute the built-in part command 
   !part $chan 

 A command can also be called as a $identifier. 


 ; Create a command. 
 alias mycommand { 
   echo -ag I was called as a $iif($isid,identifier,command) 

 ; Call the command as identifier. 
 //noop $mycommand 

 ; Call the command as a command.