From WikiChip
Difference between revisions of "mirc/identifiers/$window"
(→Parameters) |
|||
Line 1: | Line 1: | ||
− | {{mirc title|$window Identifier}}'''$window''' returns information about the specified window. | + | {{mirc title|$window Identifier}}'''$window''' returns information about the specified window for the current connection. |
− | |||
− | |||
== Synopsis == | == Synopsis == | ||
Line 10: | Line 8: | ||
* '''N''' - The Nth window, if N is 0, returns the total number of windows. | * '''N''' - The Nth window, if N is 0, returns the total number of windows. | ||
* '''Name''' - The name of query/channel/@custom window, or "status window" | * '''Name''' - The name of query/channel/@custom window, or "status window" | ||
+ | |||
+ | '''Note''': you can use -1 or @desktop to refer to the screen, -2 or @mirc to refer to the main mIRC window, and -3 or @mdi to refer to the mdi window where all others windows inside mIRC are displayed, these @name are reserved. You can use the .x .y .w .h properties with these parameters to get the size of these windows (or your screen's size) | ||
== Properties == | == Properties == | ||
− | |||
− | |||
* '''x,y,w,h''' - the left, top positions, and the width and height of the window respectively | * '''x,y,w,h''' - the left, top positions, and the width and height of the window respectively | ||
* '''dx,dy''' - the left, top positions of the window relative to the desktop | * '''dx,dy''' - the left, top positions of the window relative to the desktop | ||
Line 30: | Line 28: | ||
* '''icon''' - returns on/off depending on whether icon is visible | * '''icon''' - returns on/off depending on whether icon is visible | ||
* '''ontop''' - returns ontop status for a window, $true or $false | * '''ontop''' - returns ontop status for a window, $true or $false | ||
− | * '''type''' - returns window type: status,channel,custom,query,Urls List | + | * '''type''' - returns window type: status,channel,custom,query,Urls List |
* '''anysc''' - returns $true or $false to indicate if the /window was created using the -i switch | * '''anysc''' - returns $true or $false to indicate if the /window was created using the -i switch | ||
* '''wid''' - returns the window id number | * '''wid''' - returns the window id number | ||
* '''cid''' - returns the connection id number associated with that window. Changes based on active network if @window created using the -i switch | * '''cid''' - returns the connection id number associated with that window. Changes based on active network if @window created using the -i switch | ||
* '''hwnd''' - returns the window handle number | * '''hwnd''' - returns the window handle number | ||
− | * '''sbtext''' - sbtext returns the switchbar button text | + | * '''sbtext''' - sbtext returns the switchbar button text |
* '''sbcolor''' the name of the switchbar highlight color, event/message/highlight, or $null if not colored | * '''sbcolor''' the name of the switchbar highlight color, event/message/highlight, or $null if not colored | ||
* '''sbstate''' - returns switchbar button state for a window, 0=hidden 1=not hidden | * '''sbstate''' - returns switchbar button state for a window, 0=hidden 1=not hidden | ||
− | * '''tbtext''' - returns the treebar button text | + | * '''tbtext''' - returns the treebar button text |
* '''tbstate''' - returns treebar button state for a window, 0=hidden 1=not hidden | * '''tbstate''' - returns treebar button state for a window, 0=hidden 1=not hidden | ||
− | * '''idle''' - returns | + | * '''idle''' - returns the number of second elapsed since someone different from you spoke in a channel/query |
− | * '''lb''' - returns 0 | + | * '''lb''' - returns 0 if the window has no listbox, 1 if it has a listbox, or 2 if it has a side listbox |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == | ||
Line 58: | Line 48: | ||
//echo -a Channel named #test $iif($window(#test),is open on this .cid,is not open on this .cid but might be open on other .cid) | //echo -a Channel named #test $iif($window(#test),is open on this .cid,is not open on this .cid but might be open on other .cid) | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Compatibility == | == Compatibility == |
Revision as of 13:15, 8 November 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$window returns information about the specified window for the current connection.
Synopsis
$window(N/name)
Parameters
- N - The Nth window, if N is 0, returns the total number of windows.
- Name - The name of query/channel/@custom window, or "status window"
Note: you can use -1 or @desktop to refer to the screen, -2 or @mirc to refer to the main mIRC window, and -3 or @mdi to refer to the mdi window where all others windows inside mIRC are displayed, these @name are reserved. You can use the .x .y .w .h properties with these parameters to get the size of these windows (or your screen's size)
Properties
- x,y,w,h - the left, top positions, and the width and height of the window respectively
- dx,dy - the left, top positions of the window relative to the desktop
- dw,dh - the width and height of the text display area
- bw,bh - the width and height of the bitmap for a graphic window
- mdi - $true if the window is mdi, otherwise returns $false
- title - text in the titlebar of the window
- state - returns minimized/maximized/hidden/normal
- font - the name of the window's font
- fontsize - the window's font size
- fontbold - $true if the font is bold, otherwise returns $false
- fontitalic - $true if the font is italic, otherwise returns $false
- fontcs - the character set of the current font
- logfile - the path\filename of the window's logfile if one is open
- stamp - timestamp setting, $true or $false
- icon - returns on/off depending on whether icon is visible
- ontop - returns ontop status for a window, $true or $false
- type - returns window type: status,channel,custom,query,Urls List
- anysc - returns $true or $false to indicate if the /window was created using the -i switch
- wid - returns the window id number
- cid - returns the connection id number associated with that window. Changes based on active network if @window created using the -i switch
- hwnd - returns the window handle number
- sbtext - sbtext returns the switchbar button text
- sbcolor the name of the switchbar highlight color, event/message/highlight, or $null if not colored
- sbstate - returns switchbar button state for a window, 0=hidden 1=not hidden
- tbtext - returns the treebar button text
- tbstate - returns treebar button state for a window, 0=hidden 1=not hidden
- idle - returns the number of second elapsed since someone different from you spoke in a channel/query
- lb - returns 0 if the window has no listbox, 1 if it has a listbox, or 2 if it has a side listbox
Example
//echo -a There are $window(0) custom windows open $iif($window(1),The first custom window listed in 'window' menu is $v1) //echo -a Custom window @test $iif($window(@test),Does,Does Not) exist. //echo -a Channel named #test $iif($window(#test),is open on this .cid,is not open on this .cid but might be open on other .cid)
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.