From WikiChip
Difference between revisions of "mirc/commands/window"
< mirc‎ | commands

m (Bot: Fixing compatibility)
(Parameters)
Line 49: Line 49:
  
 
== Parameters ==
 
== Parameters ==
* '''<@name>''' - window name, must be prefixed with a @ symbol
+
* '''<@name>''' - The window name, must be prefixed with a @ symbol
* '''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)
+
* '''x y [w h]''' - The coordinates for the position and the optional width and height, use -1 for any of the parameters to use default (or existing) value
 
* '''/command''' - default command
 
* '''/command''' - default command
* '''popup.txt''' - popup filename, must be plane text file
+
* '''popup.txt''' - popup filename, must be plain text file
 
* '''font [size]''' - font name [font size]
 
* '''font [size]''' - font name [font size]
 
* '''iconfile [N]''' - sets a custom titlebar icon for the window [index]
 
* '''iconfile [N]''' - sets a custom titlebar icon for the window [index]

Revision as of 23:59, 22 July 2014

The /window command can be used to create custom window as well as picture windows (using the -p switch). You can also use this command to manipulate an already existing window as well as change things in a channel window.

Synopsis

/window [-abBcCde[N]fg[N]hHik[N]l[N]mMn[N]oprRsSuvw[N]xz] [-tN,..,N] [+bdeflLnstx] <@name> [x y [w h]] [/command] [popup.txt] [font [size]] [iconfile [N]]

Switches

Option Switches

  • -a - Set as the active window
  • -b - Update horizontal scrollbar width for the listbox
  • -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] - Set/Unset highlight for window button; 0 = non, 1 = message color, 2 = highlight color
  • -h - hide window
  • -H - Enables auto-hide for a side-listbox
  • -i - Associate window with the active connection
  • -k[N] - Hides the @ prefix; 0 = hide, 1 = show
  • -l[N] - Listbox, n - width (character count)
  • -m - Enable line marker in the window
  • -M - Trims off the text at tab stops
  • -n[N] - Minimize window; 2 = Hide auto-expanding @Treebar item
  • -o - Stop ontop (used with -d)
  • -p - Creates a picture windows
  • -r - Restore window
  • -R - Reset window position to previously saved position
  • -s - Sorts the main window (can be text or listbox)
  • -S - Sort the side-listbox
  • -u - Removes ontop setting (-o)
  • -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 switchbar, 3 = show in both
  • -x - Maximize window
  • -z[N] - Place window button at end of switchbar; 0 = restore original position, 1 = place window at end. If [N] is not given it defaults to 1

Tab Switches

  • -tN,..,N - Lets you set custom tab positions in a listbox. If a text contains tabs, it will be spaced out accordingly.
  • Appearance Switches
  • +b - Border
  • +d - No border
  • +e - 3d Edge
  • +f - Dialog frame
  • +l - Tool window
  • +L - Tool window (hide from taskbar)
  • +n - Minimize window
  • +s - Sizeable
  • +t - Titlebar
  • +x - Maximize window

Parameters

  • <@name> - The window name, must be prefixed with a @ symbol
  • x y [w h] - The coordinates for the position and the optional width and height, use -1 for any of the parameters to use default (or existing) value
  • /command - default command
  • popup.txt - popup filename, must be plain text file
  • font [size] - font name [font size]
  • iconfile [N] - sets a custom titlebar icon for the window [index]

Example

Example 1

Alias Example1 {
  ;Create a desktop + picture window, Coordinates: (250,250), size 300x300
  window -dep @Example 250 250 300 300
  ;color it color 3 (default green)
  drawfill @Example 3 3 1 1 100 100
  ;draw text "Hello There!"
  drawtext @Example 1 Arial 30 50 100 Hello There!
}

Example2

Alias Example2 {
  ;Create a desktop, Coordinates: (100,100), size 500x350
  ;Side listbox (width: 15 characters)
  window -del15 @Example 100 100 500 350
 
  ;Populate the side listbox with 5 items.
  var %a = 1
  while (%a < 5) {
    ;Add an item
    aline -l $v1 @Example Item $v1
    inc %a
  }
 
  ;Add 5 lines to the window buffer
  var %a = 1
  while (%a < 5) {
    ;Add a line of text
    aline $v1 @Example This is line $v1 $+ .
    inc %a
  }
}

Compatibility

Added: mIRC v5.0
Added on: 02 Apr 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also

v · d · e mIRC commands list

A /abook, /action, /add, /ajinvite, /alias, /aline, /ame, /amsg, /anick, /aop, /auser, /auto, /autojoin, /avoice, /away

B /background, /ban, /bcopy, /beep, /bindip, /bread, /break, /breplace, /bset, /btrunc, /bunset, /bwrite

C /channel, /clear, /clearall, /clearial, /cline, /clipboard, /close, /closechats, /closedccs, /closefserves, /closemsg, /cnick, /color, /colour, /comclose, /comlist, /commands, /comopen, /comreg, /continue, /copy, /creq, /ctcp, /ctcpreply, /ctcps

D /dcc, /dccserver, /dde, /ddeserver, /debug, /dec, /describe, /dialog, /did, /didtok, /disable, /disconnect, /dlevel, /dline, /dll, Template:mIRC/donotdisturb, /dns, /dqwindow, /drawcopy, /drawdot, /drawfill, /drawline, /drawpic, /drawrect, /drawreplace, /drawrot, /drawsave, /drawscroll, /drawsize /drawtext

E /ebeeps, /echo, /editbox, /else, /elseif, /emailaddr, /enable, /events, /exit

F /fclose, /filter, /findtext, /finger, /firewall, /flash, /flist, /flood, /flush, /flushini, /fnord, /font, /fopen, /fseek, /fsend, /fserve, /fullname, /fupdate, /fwrite

G /ghide, /gload, /gmove, /gopts, /goto, /gplay, /gpoint, /gqreq, /groups, /gshow, /gsize, /gstop, /gtalk, /gunload, /guser

H /hadd, /halt, /haltdef, /hdec, /hdel, /help, /hfree, /hinc, /hload, /hmake, /hotlink, /hop, /hsave

I /ial, /ialclear, /ialmark, /identd, /if, /ignore, /iline, /inc, /iuser

J /join

L /leave, /linesep, /links, /list, /load, /loadbuf, /localinfo, /log, /logview

M /maxdepth, /mdi, /me, /menubar, /mkdir, /mnick, /mode, /msg

N /noop, /notice, /notify

O /onotice, /omsg

P /pareline, /part, /partall, /pdcc, /perform, /play, /playctrl, /pop, /protect, /proxy, /pvoice

Q /qme, /qmsg, /query, /queryrn, /quit, /quote

R /raw, /registration, /reload, /remini, /remote, /remove, /rename, /renwin, /reseterror, /resetidle, /return, /returnex, /rlevel, /rline, /rmdir, /run, /ruser

S /save, /savebuf, /saveini, /say, /scid, /scon, /server, /set, /setlayer, /showmirc, /signal, /sline, /sockaccept, /sockclose, /socklist, /socklisten, /sockmark, /sockopen, /sockpause, /sockread, /sockrename, /sockudp, /sockwrite, /sound, /speak, /splay, /sreq, /strip, /switchbar

T /timer, /timestamp, /tip, /tips, /titlebar, /tnick, /tokenize, /toolbar, /topic /tray, /treebar

U /ulist, /unload, /unset, /unsetall, /updatenl, /url, /username, /uwho

V /var, /vcadd, /vcmd, /vcrem, /vol

W

X /xyzzy