Project

General

Profile

Actions

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

$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

$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)

$calias

Added in 2.4

$calias

Returns the calling alias for the current script,

alias test1 {
  echo -ag Calling alias is $calias
  noop $test2
}

alias test2 {
  echo -ag Calling alias is still $calias
  noop $test3
}

alias test3 {
  echo -ag Calling alias is still $calias
}

Added in 2.7

$calias(N)

Returns the Nth calling alias in the scripting stack.

Parameters

Parameter Description
N If N = 0, number of aliases in the stack, otherwise the Nth calling alias.

Properties

Property Description
.alias Returns the name of the alias.
.fname Returns the filename of the script calling the alias.
.line Returns the line number in the script calling the alias.
.isid Returns $true if the alias was called as a identifier, otherwise $false.

Example

alias alias1 {
  alias2
}

alias alias2 {
  noop $alias3
}

alias alias3 {
  var %s 0
  while (%s < $calias(0)) {
    inc %s
    linesep

    var %alias $calias(%s).alias
    echo -ag alias = %alias
    echo -ag calling filename = $calias(%s).fname
    echo -ag caling line = $calias(%s).line
    echo -ag isid = $calias(%s).isid

    if ($isalias(%alias)) {
      echo -ag alias filename = $isalias(%alias).fname
      echo -ag alias line = $isalias(%alias).fline
      echo -ag alias type = $isalias(%alias).ftype
    }

    linesep
  }
}

Updated by Per Amundsen about 6 years ago · 3 revisions

Also available in: PDF HTML TXT