Project

General

Profile

$exec » History » Revision 2

Revision 1 (Per Amundsen, 07/31/2017 08:49 PM) → Revision 2/4 (Per Amundsen, 08/01/2017 12:03 AM)

_Added in 2.9_ 

 *$exec(filename, [nh], [arguments])* 

 Executes a program and returns the output, if any. 

 _This identifier will block the AdiIRC GUI until the executed program is closed._ 

 *Parameters* 

 filename - Filename of the program to execute. 
 [nh] - n = minimize the window, h = hide the window. 
 [arguments] - Arguments to pass to the program. 

 *Example* 

 <pre> 
 ; Print all files and folders in the config folder: C: 
 alias testexec { 

   ; Put the entire output into a variable. 
   var %output = $exec(cmd.exe, h, /c dir $qt($adiircdir)) dir) 
   var %s 0 
  
   ; Loop the variable based on the $lf (newline) character. 
   while (%s < $gettok(%output, 0, 10)) {   
     inc %s 

     ; print the Nth line. 
     echo -ag $gettok(%output, %s, 10) 
   } 
 } 
 </pre>