Project

General

Profile

Custom Windows

/window

Added in 1.9.0

/window [-abBcCde[N]fg[N]hHij[N]k[N]l[N]mMn[N]opq[N]rRsStT[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 docks the window, if N is 1 undocks the window. 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.
-t 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.

Parameters

[@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

<@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 [-hl] <@name> <N[-N2]>

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

Switches

-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.

Parameter

<@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 [-ahilnpsb] [color] <@name> <N> <text>

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

Switches

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

Parameters

[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 [-ahslb] [c] <@name> <N> <text>

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

Switches

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

Parameter

[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 [-bhlmr] [c] <@name> <N|nick>

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

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

Switches

-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 listbox to default; [c] parm must be omitted
-t - Apply to text buffer. (AdiIRC only)

Parameters

[c] - Optional line color.
<@name> - Custom window name.
<N|nick> - Line number or matching listbox item 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 [-ar] <#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

-a - Appends selection to current selection.
-r - Deselects instead of selects.

Parameters

<#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.

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.
.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 display area.
.dh Height of the text display 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.
.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)
.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/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 Nicklist state (2 = visible, 0 = not visible) 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 textarea 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 message area. (AdiIRC only)
.mscrollmax Returns the max scrollbar position for the message area. (AdiIRC only)
.collapsed Returns $true if the associated Status Window is collapsed in the Treebar, otherwise $false. (AdiIRC only)

$line

Added in 1.9.0

$line(@name,N,[T])

Returns the Nth line of text in the specified window.

Parameters

@name - 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

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

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

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

Parameters

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

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

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

Properties

.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 10 months ago · 1 revisions

Also available in: PDF HTML TXT