Project

General

Profile

Actions

Custom Windows

/window

Added in 1.9.0

/window [-aAbBcCde[N]fg[N]hHij[N]k[N]l[N]mMn[N]opq[N]rRsST[N]uvw[N]xz] [-tN,..,N] [+bdeflLmnstx] <@name> [rgb|[x y [w h]]] [/command] [popup.txt] [font [size]] [iconfile [N]]

Creates or manipulates a custom window with a Topicbox/Editbox/Text area/Listbox depending on the parameters used, see Custom Windows for more information.

If -p is specified, a picture window is created which can be custom drawn using various commands/identifiers, see Picture Windows for more information.

Option Switches

Switch Description
-a Set as the active window.
-b TODO
-B Prevent window from using an internal border.
-c Close window.
-C Center window.
-d Create desktop window instead of child.
-e[N] Enable Editbox; 0 = single, 1 = multi, 2 = auto, 3 = default.
-f Makes the w h the required width and height of the text display area. (instead of the window size)
-g[N] Sets/removes window button color, 0 = normal color, 1 = message color, 2 = highlight color, 3 = system color (3 is (AdiIRC only)).
-h Hide window.
-H Enables auto-hide for a side-listbox.
-i Dynamically associate with whatever happens to be the active connection.
-j[N] Sets buffer size to N lines.
-k[N] Hides the @ prefix in the window name, 0 = hide prefix, 1 = show prefix.
-l[N] Add listbox, if N is specified then a side-listbox N characters wide is created.
-m Enable line marker in the window.
-M TODO
-n[N] Minimize window ([N] = TODO)
-o Sets the windows as the top most window. (used with -d)
-p Creates a picture windows.
-q[N] If N is 0 hides the nick column, if N is 1 shows the nick column. (AdiIRC only)
-Q[N] If N is 0 disables "Show on Desktop", if N is 1 enables "Show on Desktop". (AdiIRC only)
-r Restore window.
-R TODO
-s Sort the main window, whether text or listbox. (only listbox for now)
-S Sort the side-listbox.
-A Indicates the [rgb] parameter is defined, sets the forms transparency key to [rgb]. (AdiIRC only)
-T[N] Enable Topicbox; 0 = Show, 1 = Show Sticky, 2 = Off, 3 = default. (AdiIRC only)
-u Remove ontop setting of a desktop window.
-v Close window when associated status window is closed.
-w[N] Show/hide window from Treebar or Switchbar; 0 = hide from both, 1 = show in Switchbar, 2 = show in Treebar, 3 = show in both
-x Maximize window
-z[N] if N = 1, places window button at end of Switchbar/Treebar, if N = 0, restores original place. (Default is 1)
-Z Reset the window icon to default.

Tab Switches

Switch Description
-tN,..,N TODO

Appearance Switches

These causes graphical glitches for MDI windows because .net MDI does not like windows without proper borders.

Switch Description
+b Border.
+d No border.
+e 3d Edge.
+f Dialog frame.
+l Tool window.
+L Tool window. (hide from taskbar)
+n Minimize box.
+s Sizeable.
+t Titlebar.
+x Maximize box.

Parameters

Parameter Description
<@name> Window name.
[rgb] The $rgb value used with the -t parameter.
x y [w h] Left top [width height] - position and size of window. (A -1 value for any of the parameters means use default (or existing) value).
/command Default command.
popup.txt Popup filename, must be plane text file. TODO
font [size] Font name [font size].
iconfile [N] Sets a custom Titlebar icon for the window. (N = TODO)

Example

alias example1 {
  ; Create a desktop + picture window, Coordinates: (250,250), size 300x300.
  /window -dep @Example 250 250 300 300

  ; Color it with the control code color 3. (default is green)
  /drawfill @Example 3 3 1 1 100 100

  ; Draw text "Hello world!".
  /drawtext @Example 1 Arial 30 50 100 Hello World!

  ; Close the window.
  /window -c @Example
}

/titlebar

Added in 1.9.0

/titlebar [@window] <text>

Sets the main application Titlebar. If you specify a custom @window name, then the Titlebar for that custom window is changed.

See also $titlebar, Titlebar.

Parameters

Parameter Description
[@window] Window to change the title.
<text> Title text to set.

Example

; Changes AdiIRC's titlebar to Hello world!
/titlebar Hello world!

; Open a custom window.
/window -e @Example

; Changes @Example Titlebar to Hello world!
/titlebar @Example Hello world!

/renwin

Added in 1.9.2

/renwin <@oldname> <@newname> [topic]

Allows you to change the name of an existing window to a different one, and an optional topic can be specified.

Parameters

Parameter Description
<@oldname> Current window name.
<@newname> New window name.
[topic] Window topic/title.

Example

; Open a custom window.
/window -e @Example1

; Rename @Example1 to @Example2 and add topic 'Hello world'.
/renwin @Example1 @Example2 Hello World

/aline

Added in 1.9.1

/dline [-hlSW] <@name> <N[-N2]>

Deletes the Nth line through N2th line in a custom window.

Switches

Switch Description
-h Highlights the window's node in the treebar if the window is not active.
-l Specify the action to take place on the side-listbox.
-S Use status window. (AdiIRC only)
-W Allow using a channel or query window name for @name. (AdiIRC only)

Parameters

Parameter Description
<@name> Name of the custom window.
<N[ N2]> - The range to be deleted, (negative values are not accepted)

Example

alias example {
  ;Open a custom window.
  /window -de @Foo

  ;Add a line, line colored in yellow. (8)
  /aline 8 @Foo Line A

  ;Add a line, color Dark Green. (3)
  /aline 3 @Foo Line B

  ;Add a line, color Dark Green. (3)
  /aline -s 3 @Foo Line C

  ;Add a line, color Dark Green. (3)
  /aline -s 3 @Foo Line D

  ;Delete line 2 and 3 with range 2-3, only A D remain.
  /dline @Foo 2-3
}

/aline

Added in 2.2

/iline [-ahilnpsbTNSW] [color] <@name> <N> <text>

Inserts <text> into the Nth line in a custom window named <@name>.

Switches

Switch Description
-a Selects the newly added item while keeping the old selection in a listbox
-h Highlights the window's node in the Treebar/Switchbar is the window is minimized
-iN Indents the wrapped line by N characters.
-l Specify the action to take place on the side-listbox
-n Prevent the line from being added if it already exists
-p TODO
-s Clears the old selection in a listbox and selects the newly added item
-b Indicates the [c] color is in $rgb format. (AdiIRC only)
-TN Apply timestamp prefix options. N is a optional UTC value to use for the timestamp. (AdiIRC only)
-S Use status window. (AdiIRC only)
-W Allow using a channel or query window name for @name. (AdiIRC only)

Parameters

Parameter Description
[color] Line color number.
<@name> The custom window name.
<N> The line number to insert the text at.
<text> The text to add.

Example

; Open a custom window.
/window -de @Example

; Add 3 blue colored lines.
/aline 12 @Example Line1
/aline 12 @Example Line2
/aline 12 @Example Line3

; Insert a red colored lines at line number 2
/iline 4 @Example 2 Line4

/rline

Added in 1.9.5

/rline [-ahslbTNSW] [c] <@name> <N> <text>

Replaces the Nth line in any window with a new line.

Switches

Switch Description
-a Selects the newly added item while keeping the old selection in a listbox.
-h Highlights the window's node in the treebar is the window is not active.
-s Clears the old selection in a listbox and selects the newly added item.
-l Specify the action to take place on the side-listbox,
-b Indicates the [c] color is in $rgb format. (AdiIRC only)
-TN Apply timestamp prefix options. N is a optional UTC value to use for the timestamp. (AdiIRC only)
-S Use status window. (AdiIRC only)
-W Allow using a channel or query window name for @name. (AdiIRC only)

Parameters

Parameter Description
[c] An optional color number for the line
<@name> Name of the window.
<N> The line to change.
<text> Text to insert.

Example

alias example {
  ; Open a custom window.
  /window -de @Example

  ; Add a line with the text 'Line A'.
  /aline @Example Line A

  ; Add a line with the text 'Line B'.
  /aline @Example Line B

  ; Add a line with the text 'Line C'.
  /aline @Example Line C

  ; Change the text of the second line to 'Line D'.
  /dline @Example 2 Line D
}

/cline

Added in 1.9.3

/cline [-bhlmrSW] [c] <#channel|@name> <N|nick>

Changes the color of the Nth line or nick to color [c].

If [c] is not defined, the line will be reset to default color.

Switches

Switch Description
-b Indicates the [c] color is in $rgb format. (AdiIRC only)
-h Highlights the window's button. (if window is not active)
-l Apply to side-listbox.
-m TODO
-r Reset an item in the side-listbox to default; [c] parameter must be omitted.
-t Apply to text buffer. (AdiIRC only)
-S Use status window. (AdiIRC only)
-W Allow using a channel or query window name for @name. (AdiIRC only)

Parameters

Parameter Description
[c] Optional line color.
<@name> Custom window name.
<N|nick> Line number or matching side-listbox item/nick to color.

Example

alias example {
  ; Open a custom window.
  /window @Example

  ; Add a 'Hello World' line to the custom window.
  /aline @Example Hello World

  ; Change the color of the first line to red (4).
  /cline 4 @Example 1

  ; Change the color of the first line to rgb color blue
  /cline -b $rgb(0,0,255) 1
}

/sline

Added in 1.9.0

/sline [-arSW] <#channel> <N|nick>

Selects or de-selects lines in a channel nickname listbox. It can select either the Nth nickname in a listbox, or a specified nickname.

Switches

Switch Description
-a Appends selection to current selection.
-r Deselects instead of selects.
-S Use status window. (AdiIRC only)
-W Allow using a channel or query window name for @name. (AdiIRC only)

Parameters

Parameter Description
<#channel> Channel where the listbox is located.
<N|nick> Nick or the Nth nick to select.

Custom Window's Menus

Scripting Menus

$window

Added in 1.9.0

$window(N/@name/@wildcard, M)

Returns properties for a window.

See also /window.

Parameters

Parameter Description
N/name/wildcard Name of the window or the Nth window. (@wildcard is also possible if M is defined)
M The Nth @wildcard match. (optional)
If N is -1 returns properties for the desktop area.
If N is -2 returns properties for the AdiIRC main window.
If N is -3 returns properties for the MDI client area of the main window.

Properties

Propertie Description
.x Horizontal position of the window relative to the mainform.
.y Vertical position of the window relative to the mainform.
.w Window width.
.h Window height.
.cx TODO
.cy TODO
.dx Horizontal position of the window relative to the desktop.
.dy Vertical position of the window relative to the desktop.
.dw Width of the Text Area.
.dh Height of the Text Area.
.bw Width of the bitmap for a picture window.
.bh Height of the bitmap for a picture window.
.mdi $true if the window is a MDI window/docked, otherwise $false
.title The text of the window Titlebar.
.state minimized/maximized/hidden/normal.
.font Name of the current font.
.fontsize Size of the current font using the current display DPI.
.fontdialogsize The real size of the current font.
.fontbold $true if the font is bold, otherwise $false.
.fontitalic $true if the font is italic, otherwise $false.
.fontunderline $true if the font is underline, otherwise $false.
.fontcs returns the character set of the current font.
.logfile Name of logfile if one is open for the window.
.historyfile Name of the file Editbox history will be saved to. (AdiIRC only)
.iconfile Name of the icon file used for a custom icon. (AdiIRC only)
.backgroundfile Name of the background file used for a custom background. (AdiIRC only)
.backgroundlayout Gets background layout for this window. (AdiIRC only)
.stamp $true if timestamp is on for this window, otherwise $false.
.icon $true if icon is visible in Switchbar otherwise $false.
.ontop $true if window is on top otherwise $false.
.type Window type, channel/status/query/custom/picture/chat/tool/panel.
.anysc $true if the window was created with the /window -i parameter, otherwise $false.
.wid Window id.
.cid Connection id.
.hwnd Window handle.
.sbtext Switchbar button text for this window.
.sbcolor Switchbar color event event/message/highlight for this window.
.sbstate Switchbar button state (1 = visible, 0 = not visible) for this window.
.tbtext Treebar text for this window.
.tbstate Treebar state (1 = visible, 0 = not visible) for this window.
.lb listbox state (2 = side listbox, 1 = listbox, 0 = no listbox) for this window.
.topicbox Topicbox state (2 = Show sticky, 1 = show, 2 = off) for this window. (AdiIRC only)
.idle idle state.
.isbottom $true if the Text Area is scrolled to the bottom, otherwise $false. (AdiIRC only)
.unread Returns number of unread messages. (this include system messages, use .sbcolor to check the type, AdiIRC only)
.layer Returns the window layer. (AdiIRC only)
.mscrollpos Returns the current scrollbar position for the Text Area. (AdiIRC only)
.mscrollmax Returns the max scrollbar position for the Text Area. (AdiIRC only)
.collapsed Returns $true if the associated Status Window is collapsed in the Treebar, otherwise $false. (AdiIRC only)
.eb Returns 1 if the window has a Editbox, otherwise 0. (AdiIRC only)
.fullscreen Returns $true if the window is fullscreen, otherwise $false.

$line

Added in 1.9.0

$line(@window|#channel|nick|Status Window,N,[T])

Returns the Nth line of text in the specified window.

Works on any window.

Parameters

Parameter Description
@window|#channel|nick|Status Window The window to retrieve text from.
N If N = 0 number of lines, otherwise the Nth line.
[T] If T = 0 use display area (default) if T = 1, use side-listbox. (optional)

Properties

Property Description
.state Returns 1 if the line is selected in a side-listbox, otherwise 0.
.color Returns the line or nick color.
.rgbcolor For side-listbox returns the line color in $rgb format, otherwise returns the rgb line color if any (AdiIRC only)
.nickcolumn Gets the line with the nickcolumn character intact. (AdiIRC Only)

Example

; Create a custom window.
/window @Example

; Add a few lines to the window.
/aline @Example Test1
/aline @Example Test2
/aline @Example Test3

; Print number of lines in the window.
//echo -ag $line(@Example, 0)

; Print the second line in the window.
//echo -ag $line(@Example, 2)

$fline

Added in 1.9.0

$fline(@name,wildtext,[N],[T],[S])

Returns Nth position of line which matches the specified wildcard text.

See also $flinen.

Parameters

Parameter Description
@name The custom window name to search.
wildtext Wildcard text to search for.
[N] If N = 0 returns number of matches, otherwise the Nth match. (Optional, default is 1)
[T] If T = 0 reference the display area (default), If T is 1, it references the listbox, 2 implies that wildtext is a regular expression, and 3 for both. (Optional)
[S] Start the search at the Sth line.

Properties

Property Description
.text Returns the matched text.

Example

; Open a custom window.
/window @Example

; Add some lines
/aline @Example Test1
/aline @Example Test2
/aline @Example Test3

; Search the display area for the wildtext 'Text*' and print number of results.
//echo -ag $fline(@Example, Test*, 0)

; Search the display area for the wildtext 'Text*' and print the second result.
//echo -ag $fline(@Example, Test*, 2)

$sline

Added in 1.9.0

$sline(@name,N)

Returns the Nth selected line in a listbox.

Parameters

Parameter Description
@name The window name.
N If N = 0, returns the total number of selected lines in the window, otherwise the Nth line.

Properties

Property Description
.ln Returns the line number of Nth selected line.

Example

; Create a custom window with a listbox.
/window -l @example

; Add some items to the listbox.
/aline @example Test1
/aline @example Test2
/aline @example Test2

; Select the second line in the listbox.
/sline @example 2

; Print the number og selected lines in the listbox.
//echo -ag $sline(@example, 0)

; Print the value of the first selected line in the listbox.
//echo -ag $sline(@example, 1)

; Print the line number of the first selected line in the listbox.
//echo -ag $sline(@example, 1).ln

Updated by Mr. BS over 7 years ago · 1 revisions

Also available in: PDF HTML TXT