Project

General

Profile

Picture 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

/drawcopy

Added in 1.9.0

/drawcopy -himnrt <@window> [color] <x y w h> <@window> <x y [w h]>

Copies part of a picture to a different position in the same window or to another window. If the second [w h] parameters are specified, the picture is stretched/squeezed to fit.

Switches

-h - Highlights the windows icon if it is minimized.
-i - Draws in inverse mode.
-m - Changes the stretch mode quality when the picture is resized.
-n - Prevents the display from being updated immediately.
-r - Indicates that the color is in RGB format. You can use $rgb(N,N,N) to create an RGB value.
-t - Indicates that you have specified the [color] RGB value as a transparent color in the source bitmap.

Parameters

<@window> - The picture window to copy from.
[color] - If -t is used, the RGB color used for transparency.
<x y w h> - Portion to of the source @window to copy.
<@window> - The picture window to copy to.
<x y [w h]> - The coordinate where to draw, if [w h] are specified, the picture is squeed/stretched to fit, they can be negative value to get a mirror effect.

/drawdot

Added in 1.9.0

/drawdot [-ihnr] <@window> <color> <size> <x y> [<x y>...]

Draws a dot using the specified color and size at the x,y co-ordinates. Multiple co-ordinates can be provided.

Switches

-i - Draws in inverse mode.
-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.
-r - Indicates that the color is in RGB format. You can use $rgb(N,N,N) to create an RGB value.

Parameters

<@window> - The picture window to draw in.
<color> - Color off the dot to draw.
<size> - Size of the dot to draw.
<x y> - x,y co-ordinates to draw at.
[<x y>...] - Additional x,y co-ordinates to draw at.

/drawfill

Added in 1.9.0

/drawfill [-ihnrs] <@window> <color> <color> <x y> [filename] [<x y>...]

Fills an area with the specified color starting at the specified co-ordinates.

Switches

-i - Draws in inverse mode.
-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.
-r - Indicates that the color is in RGB format. You can use $rgb(N,N,N) to create an RGB value.
-s - Indicates that the second color parameter is the color that should be filled (surface fill). If no -s is specified, the second color is the border color at which filling should stop (border fill).

Parameters

<@window> - Name of the picture window to draw.
<color> - The color used for the fill.
<color> - The color used to know how to fill (if -s, it fills as long as the color of the pixels around is the same color as the one you provide here, otherwise, it fills as long as the color of pixel is not the color you provide here)
<x y> - The coordinate where to fill.
[filename] - TODO
[<x y>...] - TODO

/drawline

Added in 1.9.0

/drawline [-ihnr] <@window> <color> <size> <x y> <x y> [<x y>...]

Draws a line from the first <x y> co-ordinate to the second, if more co-ordinates are specified, the line is continued.

Switches

-i - Draws in inverse mode.
-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.
-r - Indicates that the color is in RGB format. You can use $rgb(N,N,N) to create an RGB value.

Parameters

<@window> - The picture window to draw in.
<color> - Color off the line to draw.
<size> - Size of the line to draw.
<x y> - x,y co-ordinates to draw at.
[<x y>...] - Additional points to draw.

/drawpic

Added in 1.9.0

/drawpic -ihmnotsclgN <@window> [color] <x y [w h]> [x y w h] [N] <filename>

Switches

-t - TODO
-s - Indicates that you have specified the first [w h] parameters to squeeze/stretch the bitmap.
-c - Indicates that the bitmap should be cached. This greatly speeds up subsequent references to this bitmap. If you specify -c and the bitmap is already in the cache, it is loaded and used from the cache, otherwise it is reloaded from the file. You can clear the entire cache with /drawpic -c.
-l - TODO
-m - Changes the stretch mode quality when the picture is resized.
-o - Indicates that you have specified the [N] value before the filename, representing the index of the icon in the file.
-gN - TODO
-i - TODO
-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.

Parameters

<@window> - The window name to draw.
[color] - If -t is used, the RGB color used for transparency.
<x y [w h]> - The x y coordinates where you want to draw, if -s is used, [w h] is the width/height that will be used to squeeze/stretch the bitmap.
[x y w h] - The area in the picture to be drawn.
[N] - If -o is used, the index number of the picture in the file.
<filename> - The filename for the picture.

/drawrect

Added in 1.9.0

/drawrect -ihnrfecd <@window> <color> <size> <x y w h> [<x y w h>...]

Draws a rectangle at the specified co-ordinates of the specified width and height. If more co-ordinates are specified these are also drawn as separate rectangles.

Switches

-i - Draws in inverse mode.
-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.
-r - Indicates that the color is in RGB format. You can use $rgb(N,N,N) to create an RGB value.
-f - Draws a filled rectangle.
-e - Draws an ellipse instead of a rectangle.
-c - Draws a focus rectangle.
-d - Draws a rounded rectangle, using the format "/drawrect -d x y w h [w h]" where w and h are the width and height of the ellipse used to draw the corners.

Parameters

<@window> - Name of the Picture Window to draw to.
<color> - The color used for the rectangle.
<size> - Thickness of the border in pixels.
<x y w h> - Co-ordinates for a rectangle in pixels, x and y are the top left corner.
[<x y w h>...] - Draw additional rectangles.

/drawreplace

Added in 1.9.0

/drawreplace -nr <@window> <color1> <color2> [x y w h]

Replaces all occurrences of color1 with color2.

Switches

-n - Prevents the display from being updated immediately.
-r - Indicates that the color is in RGB format. You can use $rgb(N,N,N) to create an RGB value.

Parameters

<@window> - Name of the picture window to draw.
<color1> - The color to replace.
<color2> - The color to replace with.
[x y w h] - the area of the picture to replace.

/drawrot

Added in 1.9.0

/drawrot -hmnbfc <@window> [color] <angle> [x y w h]

Rotates an area of a bitmap by the specified angle.

Switches

-b - Indicates that you have specified the background color value
-f - TODO
-c - TODO
-m - Changes the stretch mode quality when the picture is resized.

Parameters

<@window> - Name of the window to rotate.
[color] - The background color to use if -b is defined.
<angle> - The angle of the rotation.
[x y w h] - The area to rotate.

/drawsave

Added in 1.9.0

/drawsave -bNqN <@window> <filename>

Saves the background picture of the specified picture @window to a file.

Switches

-bN - TODO
-qN - TODO

Parameters

<@window> - Window name to save from.
<filename> - Filename to save to.

/drawscroll

Added in 1.9.0

/drawscroll -hn <@window> <x> <y> <x y w h> [<x> <y> <x y w h>...]

Scrolls the region inside the specified rectangle. The first <x> and <y> parameters represent the distance to scroll and can be positive or negative.

Switches

-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.

Parameters

<@window> - Name of the window to scroll.
<x> - The number of pixel to scroll on the x axis.
<y> - The number of pixel to scroll on the y axis.
<x y w h> - The region to scroll.
[<x> <y> <x y w h>...] - Additional pixels and regions to scroll.

/drawtext

Added in 1.9.0

/drawtext -hnrpboc <@window> <color> [color] [fontname fontsize] <x y [w h]> <text>

Draws text at the specified co-ordinates.

Switches

-p - Processes and interprets control codes in the text.
-b - Indicates that you have specified the second color parameter as the background color for the text.
-o - Indicates specified font should be in bold.
-c - Indicates that you have specified the [w h] values as the rectangle in which text should be printed. Text will be clipped if it extends beyond this rectangle.
-h - Highlights the windows icon if it is minimized.
-n - Prevents the display from being updated immediately.
-r - Indicates that the colors are in RGB format.

Parameters

<@window> - Name of the window to draw.
<color> - The textcolor.
[color] - The background color, if -b has been specified.
[fontname fontsize] - The name of the font and the size of the font.
<x y [w h]> - The coordinate of the text.
<text> - The text to draw.

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

$width

Added in 1.9.1

$width(text,font,size,[B],[C])

Returns width of text in pixels for the specified font.

If you use a negative number for the font size, it will match the size of fonts in the font dialogs.

Parameters

text - Text to measure.
font - Font to measure.
size - Font size to measure.
[B] - If B is non-zero, the font is bold. (optional)
[C] - If C is non-zero, control codes are processed. (optional)

Example

; Measure the width of text 'Hello World' using font 'Verdana 9'.
//echo -ag $width(Hello world, Verdana, 9)

$height

Added in 1.9.1

$height(text,font,size)

Returns height of text in pixels for the specified font.

If you use a negative number for the font size, it will match the size of fonts in the font dialogs.

Parameters

text - Text to measure.
font - Font to measure.
size - Font size to measure.

Example

; Measure the height of text 'Hello World' using font 'Verdana 9'.
//echo -ag $height(Hello world, Verdana, 9)

$click

Added in 1.9.4

$click(@window, N)

Retrieves mouse click information from a picture window.

If no properties is defined, returns both X Y.

Parameters

@window - Picture window to use.
N - The Nth mouse click item, if N = 0, returns number of mouse click items.

Properties

.x - Returns the X coordinate of the mouse click.
.y - Returns the Y coordinate of the mouse click.

Example

; Create the custom alias to launch the example
;
; Synopsis: /clickWatch

alias clickWatch { 
  ; Create a custom picture window, which is centered.
  window -dpC @clicker 0 0 250 125

  ; Custom 'update' alias keeps code from repeating.
  ; During initial launch the values should be empty.
  update 15 Total Clicks: empty
  update 35 Current Position: none yet
  update 55 Previous Position: none yet
}
; Monitor the sclicks in our custom '@clicker' window.
menu @clicker  {
  sclick: {

    ; Clear the window for the new value updates.
    clear @clicker

    ; Set the %current and %prev variables to the current.
    ; x/y click location, and to the previous x/y click.
    ; locations, respectively.
    var %current = $click(@clicker,0), %prev = $calc(%current - 1)

    ; Utilizing the custom 'update' alias, update the data.
    update 15 Total Clicks: $click(@clicker,0)
    update 35 Current Position: $click(@clicker,%current)
    update 55 Previous Position: $iif(%prev,$click(@clicker,%prev),none yet)
  }
}
; Custom update alias removes a lot of the /drawtext repetition.
; from this example.
alias -l update {
  drawtext @clicker $color(normal) 7 $1 $2-
}

$inellipse

Added in 1.9.0

$inellipse(x,y,x,y,w,h)

Returns $true if the point x y is inside the specified ellipse, otherwise $false.

$inrect

Added in 1.9.0

$inrect(x,y,x,y,w,h)

Returns $true if the point x y is inside the specified rectangle, otherwise $false.

$inroundrect

Added in 1.9.4

$inroundrect(x,y,x,y,w,h,w,h)

Returns $true if the point x y (the first ones) is inside the specified rounded rectangle, otherwise $false.

$inpoly

Added in 1.9.0

$inpoly(x,y,a1,a2,b1,b2,...)

Returns $true if the point x y is inside the polygon defined by the specified points, otherwise $false.

$onpoly

Added in 1.9.4

$onpoly(n1,n2,x,y,x,y,...)

Returns $true if two polygons overlap, otherwise $false.

Parameters

n1 - Number of points in the first polygon.
n2 - Number of points in the second polygon.
x - First x coordinate.
y - First y coordinate.
x - Second x coordinate.
y - Second y coordinate.
... - Additional coordinates.

$getdot

Added in 1.9.1

$getdot(@,x,y)

Returns the RGB color value of the dot at the specified position in a picture window.

Parameters

@ - The picture window name.
x - The X coordinate.
y - The Y coordinate.

Example

; Open a picture window.
/window -p @Example

; Fill a rectangle on the picture window.
/drawfill @Example 4 4 0 0

; Get the RGB color value at x coordinate 0 and y coordinate 0.
//echo -ag $getdot(@Example, 0, 0)

$lineheight

Added in 1.9.5

$lineheight(font, size)

Returns the line height of the given font and size.

Parameters

font - Font to calculate.
size - Font size to calculate.

Example

//echo -ag Lineheight for Consolas 10 is $lineheight(Consolas, 10)

$pic

Added in 1.9.1

$pic(filename)

Returns the filesize/imagesize of a image file.

Parameters

filename - Image file to check.

Properties

.width - Return the image width.
.height - Return the image height.
.size - Return the image size.

Example

; Print width and height of a image file.
//echo -ag Image width is $pic(image.jpg).width height is $pic(image.jpg).height

$mouse

Added in 1.9.0

$mouse

Returns various properties about the mouse and keys pressed during events.

Properties

.lb - Returns $true if the mouse event occurred in a side-listbox otherwise $false.
.x - Mouse X position relative to active window.
.y - Mouse Y position relative to active window.
.mx - Mouse X position relative to AdiIRC main window.
.my - Mouse Y position relative to AdiIRC main window.
.dx - Mouse X position relative to the desktop area.
.dy - Mouse Y position relative to the desktop area.
.key - Bitwise flag, see example.

Example

alias Example {
  ; Test $mouse.key for various values, more than one value can be true.
  if ($mouse.key & 1) echo left button is pressed.
  if ($mouse.key & 2) echo control key is pressed.
  if ($mouse.key & 4) echo shift key is pressed.
  if ($mouse.key & 8) echo alt key is pressed.
  if ($mouse.key & 16) echo right mouse button is pressed.
  if ($mouse.key & 32) echo middle mouse button is pressed.
  if ($mouse.key & 64) echo x mouse button 1 is pressed.
  if ($mouse.key & 128) echo x mouse button 2 is pressed.
}

; Print mouse X and Y coordinates.
//echo -ag $mouse.x / $mouse.y

$rgb

Added in 1.9.0

$rgb(N,N,N|N|name)

If N,N,N is defined, returns an RGB decimal color value.
if N is defined, returns a RRR,GGG,BBB value.
if name is defined, returns a system color RGB decimal value.

Parameters

N,N,N - An RRR,GGG,BBB value.
N - A RGB decimal value.
name - A system color name: face, shadow, hilight, 3dlight, frame, or text.

Switches

.hex - Returns the value in hex format. (AdiIRC only)

Example

; Print the RGB decimal value from 123,123,123
//echo -ag RGB value is $rgb(123,123,123)

; Print the RRR,GGG,BBB value from 8092539
//echo -ag RGB decimal value is $rgb(8092539)

Also available in: PDF HTML TXT