(→Parameters) |
|||
Line 6: | Line 6: | ||
== Switches == | == Switches == | ||
− | Option Switches | + | === Option Switches === |
* '''-a''' - Set as the active window | * '''-a''' - Set as the active window | ||
* '''-b''' - Update horizontal scrollbar width for the listbox | * '''-b''' - Update horizontal scrollbar width for the listbox | ||
Line 37: | Line 37: | ||
* '''-x''' - Maximize window | * '''-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 | * '''-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. | ||
− | + | ||
+ | === Appearance Switches === | ||
* '''+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 | + | * '''+l''' - Tool window<ref name="tool">Explanation of tool windows required.</ref> |
− | * '''+L''' - Tool window (hide from taskbar) | + | * '''+L''' - Tool window (hide from taskbar) <ref name="tool" /> |
* '''+n''' - Minimize window | * '''+n''' - Minimize window | ||
* '''+s''' - Sizeable | * '''+s''' - Sizeable | ||
Line 63: | Line 65: | ||
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. | ||
− | == | + | == Examples == |
− | Example 1 | + | === Example 1 === |
+ | Picture window | ||
<syntaxhighlight lang="mIRC">Alias Example1 { | <syntaxhighlight lang="mIRC">Alias Example1 { | ||
;Create a desktop + picture window, Coordinates: (250,250), size 300x300 | ;Create a desktop + picture window, Coordinates: (250,250), size 300x300 | ||
Line 74: | Line 77: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | + | === Example 2 === | |
− | + | Custom window with side listbox | |
<syntaxhighlight lang="mIRC">Alias Example2 { | <syntaxhighlight lang="mIRC">Alias Example2 { | ||
;Create a desktop, Coordinates: (100,100), size 500x350 | ;Create a desktop, Coordinates: (100,100), size 500x350 | ||
Line 98: | Line 101: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | Example | + | === Example 3 === |
− | + | Making unique window name from $nick while avoiding the 3 protected window names: | |
<syntaxhighlight lang="mIRC"> | <syntaxhighlight lang="mIRC"> | ||
//window -ek @ $+ $nick $+ $iif($istok(mdi desktop mirc,$nick,32),$ctime) | //window -ek @ $+ $nick $+ $iif($istok(mdi desktop mirc,$nick,32),$ctime) | ||
Line 122: | Line 125: | ||
* {{mIRC|/sline}} | * {{mIRC|/sline}} | ||
{{mIRC command list}} | {{mIRC command list}} | ||
+ | |||
+ | == Notes == | ||
+ | <references /> | ||
[[Category:mIRC commands|window command - mIRC]] | [[Category:mIRC commands|window command - mIRC]] |
Revision as of 04:02, 15 October 2017
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.
Contents
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]]
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
- -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 = 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
- -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 - 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 treebar, 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[1]
- +L - Tool window (hide from taskbar) [1]
- +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 - 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, a default value is used, unless the window exists in which case the current value is used.
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
Example 1
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
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
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
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
- List of commands
- List of identifiers
- $window
- $line
- $fline
- $sline
- /aline
- /cline
- /dline
- /iline
- /renwin
- /rline
- /sline