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

m (Add new -qS:P switch for v7.78)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{mirc title|/window Command}}
 
{{mirc title|/window Command}}
The '''/window command''' can be used to create [[Custom Windows - mIRC|custom window]] as well as [[Picture Windows - mIRC|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.
+
The '''/window command''' can be used to create [[Custom Windows - mIRC|custom windows]] and [[Picture Windows - mIRC|picture windows]] (using the -p switch), or to manipulate an existing custom or channel window.
 +
 
  
 
== Synopsis ==
 
== Synopsis ==
  /window [-abBcCdDe[N]fg[N]hHij[N]k[N]l[N]mMn[N]oprRsSuvw[N]xz] [-tN,..,N] [+bdeflLnstx] <@name> [x y [w h]] [/command] [popup.txt/@popup] [font [size]] [iconfile [N]]
+
  /window [-abBcCdDe[N]fg[N]hHij[N]k[N]l[N]mMn[N]oprRsSuvw[N]xyz] [-tN,..,N] [+bdeflLnstx] <@name> [x y [w h]] [/command] [popup.txt/@popup] [font [size]] [iconfile [N]]
  
 
== Switches ==
 
== Switches ==
Line 12: Line 13:
 
* '''-c''' - Close window  
 
* '''-c''' - Close window  
 
* '''-C''' - Center window  
 
* '''-C''' - Center window  
* '''-d''' - Create desktop window instead of child
+
* '''-d''' - Create a separate desktop window (separate button in Windows taskbar) instead of a mIRC mdi window
 
* '''-D''' - Enables @window's upper-left system menu choice to toggle @window between mdi/desktop without closing the window
 
* '''-D''' - Enables @window's upper-left system menu choice to toggle @window between mdi/desktop without closing the window
 
* '''-e[N]''' - Enable editbox; 0 = single, 1 = multi, 2 = auto, 3 = default  
 
* '''-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)  
 
* '''-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
+
* '''-g[N]''' - Set/Unset highlight for window button; 0 = none, 1 = message colour, 2 = highlight colour, 3 = event colour
* '''-h''' - hide window  
+
* '''-h''' - hide window (from the switchbar / treebar - it is still visible in mIRC's Window menu)
 
* '''-H''' - Enables auto-hide for a side-listbox  
 
* '''-H''' - Enables auto-hide for a side-listbox  
 
* '''-i''' - Associate window with the active connection  
 
* '''-i''' - Associate window with the active connection  
Line 26: Line 27:
 
* '''-M''' - Trims off the text at tab stops  
 
* '''-M''' - Trims off the text at tab stops  
 
* '''-n[N]''' - Minimize window; 2 = Hide auto-expanding @Treebar item
 
* '''-n[N]''' - Minimize window; 2 = Hide auto-expanding @Treebar item
* '''-o''' - Stop ontop (used with -d)  
+
* '''-o''' - (used with -d) keep the desktop window on top of other windows 
* '''-p''' - Creates a [[Picture Windows - mIRC|picture windows]]
+
* '''-p''' - Creates a [[Picture Windows - mIRC|picture window]]
 +
* '''-qS:P''' - sets the S state and P percent of the progress bar for a custom @window, where S = 0 disabled, 1 = in progress, 2 = success, 3 = error
 
* '''-r''' - Restore window  
 
* '''-r''' - Restore window  
 
* '''-R''' - Reset window position to previously saved position  
 
* '''-R''' - Reset window position to previously saved position  
 
* '''-s''' - Sorts the main window (can be text or listbox)  
 
* '''-s''' - Sorts the main window (can be text or listbox)  
 
* '''-S''' - Sort the side-listbox  
 
* '''-S''' - Sort the side-listbox  
* '''-u''' - Removes ontop setting (-o)  
+
* '''-u''' - Removes on-top setting (-o)  
 
* '''-v''' - Close window when associated status window is closed  
 
* '''-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  
 
* '''-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  
 
* '''-x''' - Maximize window  
 +
* '''-y''' - Disables logging menu for 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
 
* '''-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 ===
 
=== Tab Switches ===
* '''-tN,..,N''' - Lets you set custom tab positions in a listbox. If a text contains tabs, it will be spaced out accordingly.
+
* '''-tN,..,N''' - Lets you set custom tab positions in a listbox. If a text contains tabs, it will be spaced out accordingly, if you don't specify at least one tab stop, the window is not created but no error will be displayed.
 +
 
 +
'''Note''': By default a window contains a tab stop every 8 characters and it is possible to use /window -M without using /window -t.
 +
 
 +
'''Note2''': It is now possible to use N = 0 if you are using -M, to create an invisible column, which can be useful to hide meta-data for that line.
 +
 
 +
'''Note3''': You can update the tab stop position once the window has been created with /window -t @win N N N, which is different from the orignal syntax /window -tN,N,N @win
  
 
=== Appearance Switches ===
 
=== Appearance Switches ===
 +
Mostly applicable to Desktop windows:
 
* '''+b''' - Border
 
* '''+b''' - Border
 
* '''+d''' - No border  
 
* '''+d''' - No border  
 
* '''+e''' - 3d Edge  
 
* '''+e''' - 3d Edge  
 
* '''+f''' - Dialog frame  
 
* '''+f''' - Dialog frame  
* '''+l''' - Tool window<ref name="tool">Explanation of tool windows required.</ref>
+
* '''+l''' - Tool window <ref group="app." name="tool">Tools windows have no Titlebar or min/max/close buttons.</ref>
* '''+L''' - Tool window (hide from taskbar) <ref name="tool" />
+
* '''+L''' - Tool window (hide from taskbar) <ref group="app." name="tool" />
 
* '''+n''' - Minimize window  
 
* '''+n''' - Minimize window  
 
* '''+s''' - Sizeable
 
* '''+s''' - Sizeable
 
* '''+t''' - Titlebar
 
* '''+t''' - Titlebar
* '''+x''' - Maximize window  
+
* '''+x''' - Maximize window
 +
 
 +
<references group="app." />
  
 
== Parameters ==
 
== Parameters ==
 
* '''<@name>''' - The window name, must be prefixed with a @ symbol
 
* '''<@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
 
* '''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 which is used to prepopulate the window's editbox
 
* '''popup.txt/@popup''' - popup filename, must be plain text file, or can be the name of a window, representing the popups menu of that window in a remote file
 
* '''popup.txt/@popup''' - popup filename, must be plain text file, or can be the name of a window, representing the popups menu of that window in a remote 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]
  
Note: If you specify -1 for any of the x,y,w,h values, a default value is used, unless the window exists in which case the current value is used.
+
Note: If you specify -1 for any of the x,y,w,h values, the current value is used for an existing window, or a default value used if you are creating a new window.
  
 
Note: mIRC does not allow window names @mirc (-2) or @mdi (-3) or @desktop (-1), that's because these names are used internally by mIRC to represent the different mIRC windows for $window(-1), $window(-2) and $window(-3). You can use these names in $window() though, to make things clearer if you want.
 
Note: mIRC does not allow window names @mirc (-2) or @mdi (-3) or @desktop (-1), that's because these names are used internally by mIRC to represent the different mIRC windows for $window(-1), $window(-2) and $window(-3). You can use these names in $window() though, to make things clearer if you want.
Line 125: Line 137:
 
* {{mIRC|/sline}}
 
* {{mIRC|/sline}}
 
{{mIRC command list}}
 
{{mIRC command list}}
 
== Notes ==
 
<references />
 
  
 
[[Category:mIRC commands|window command - mIRC]]
 
[[Category:mIRC commands|window command - mIRC]]

Latest revision as of 12:00, 8 November 2024

The /window command can be used to create custom windows and picture windows (using the -p switch), or to manipulate an existing custom or channel window.


Synopsis[edit]

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

Switches[edit]

Option Switches[edit]

  • -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 a separate desktop window (separate button in Windows taskbar) instead of a mIRC mdi window
  • -D - Enables @window's upper-left system menu choice to toggle @window between mdi/desktop without closing the window
  • -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 = none, 1 = message colour, 2 = highlight colour, 3 = event colour
  • -h - hide window (from the switchbar / treebar - it is still visible in mIRC's Window menu)
  • -H - Enables auto-hide for a side-listbox
  • -i - Associate window with the active connection
  • -j[N] - Change max lines. If N=0 or -j not used, max lines changes with current setting for mirc-Options/Other/WindowBuffer that defaults as 5000. Adding lines to full window causes lines at top of window to be deleted.
  • -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 - (used with -d) keep the desktop window on top of other windows
  • -p - Creates a picture window
  • -qS:P - sets the S state and P percent of the progress bar for a custom @window, where S = 0 disabled, 1 = in progress, 2 = success, 3 = error
  • -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 on-top 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 treebar, 3 = show in both
  • -x - Maximize window
  • -y - Disables logging menu for 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[edit]

  • -tN,..,N - Lets you set custom tab positions in a listbox. If a text contains tabs, it will be spaced out accordingly, if you don't specify at least one tab stop, the window is not created but no error will be displayed.

Note: By default a window contains a tab stop every 8 characters and it is possible to use /window -M without using /window -t.

Note2: It is now possible to use N = 0 if you are using -M, to create an invisible column, which can be useful to hide meta-data for that line.

Note3: You can update the tab stop position once the window has been created with /window -t @win N N N, which is different from the orignal syntax /window -tN,N,N @win

Appearance Switches[edit]

Mostly applicable to Desktop windows:

  • +b - Border
  • +d - No border
  • +e - 3d Edge
  • +f - Dialog frame
  • +l - Tool window [app. 1]
  • +L - Tool window (hide from taskbar) [app. 1]
  • +n - Minimize window
  • +s - Sizeable
  • +t - Titlebar
  • +x - Maximize window
  1. 1.0 1.1 Tools windows have no Titlebar or min/max/close buttons.

Parameters[edit]

  • <@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 which is used to prepopulate the window's editbox
  • popup.txt/@popup - popup filename, must be plain text file, or can be the name of a window, representing the popups menu of that window in a remote file
  • font [size] - font name [font size]
  • iconfile [N] - sets a custom titlebar icon for the window [index]

Note: If you specify -1 for any of the x,y,w,h values, the current value is used for an existing window, or a default value used if you are creating a new window.

Note: mIRC does not allow window names @mirc (-2) or @mdi (-3) or @desktop (-1), that's because these names are used internally by mIRC to represent the different mIRC windows for $window(-1), $window(-2) and $window(-3). You can use these names in $window() though, to make things clearer if you want.

Examples[edit]

Example 1[edit]

Picture window

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!
}

Example 2[edit]

Custom window with side listbox

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

Example 3[edit]

Making unique window name from $nick while avoiding the 3 protected window names:

//window -ek @ $+ $nick $+ $iif($istok(mdi desktop mirc,$nick,32),$ctime)

Compatibility[edit]

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[edit]

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