Project

General

Profile

Actions

Added in 2.9

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

Executes a program and returns the output, if any.

See also /run.

This identifier will block the AdiIRC user interface until the executed program is closed/finished.

Parameters

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

Example

; Print all files and folders in the config folder:
alias testexec {

  ; Put the entire output into a variable.
  var %output = $exec(cmd.exe, h, /c dir $qt($adiircdir))
  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)
  }
}

Updated by Per Amundsen about 1 year ago · 4 revisions

Also available in: PDF HTML TXT