From WikiChip
Editing mirc/custom windows

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
{{mirc title|Custom Windows}}
 
 
Prior to mIRC 5.5, '''Custom Windows''' was the main method for making a GUI (graphical user interface).
 
Prior to mIRC 5.5, '''Custom Windows''' was the main method for making a GUI (graphical user interface).
  
Line 11: Line 10:
  
 
== Creating a window ==
 
== Creating a window ==
Before you can do anything with a window, you must actually create it. All windows must have a name, their name must also start with the '@' symbol. The name can be anything as long as it doesn't contain spaces. Use the {{mIRC|/window}} command to create a window:
+
Before you can do anything with a window, you must actually create it. All windows must have a name, their name must also start with the '@' symbol. The name can be anything as long as it doesn't contain spaces. To create a window you can use the following command:
  
 
<syntaxhighlight lang="mirc">/window @<WindowName> [x y [w h]]</syntaxhighlight>
 
<syntaxhighlight lang="mirc">/window @<WindowName> [x y [w h]]</syntaxhighlight>
Line 69: Line 68:
 
}</syntaxhighlight>
 
}</syntaxhighlight>
  
There are 8 possible built-in events; however, only 3 of them pertain to regular custom windows (the rest can only be used in a {{mIRC|Picture Windows#Mouse Events|Picture Window}}.
+
There are 8 possible events; however, only 3 of them pertain to regular custom windows (the rest can only be used in a <a href="/mirc/pic_window" title="picture windows">picture window</a>).
  
 
* '''dclick''' - Triggers when a mouse has double clicked on the window.
 
* '''dclick''' - Triggers when a mouse has double clicked on the window.
Line 75: Line 74:
 
* '''lbclick''' - Triggers when an item from the side-listbox was clicked.
 
* '''lbclick''' - Triggers when an item from the side-listbox was clicked.
  
In addition to built-in events, you can also add your own custom menu items.
+
In addition to built-in events, you can also add custom menu items. If you have mouse events as well as a custom menu items, the events MUST best placed above the menu items. The basic syntax for the menu items is:
 
 
'''Note''': if you have built-in mouse events as well as custom menu items, the built-in events MUST be placed above the custom menu items. The basic syntax for the menu items is:
 
  
 
<syntaxhighlight lang="mirc">menu @windowName {
 
<syntaxhighlight lang="mirc">menu @windowName {
Line 100: Line 97:
 
will generate the following menu:
 
will generate the following menu:
  
[[File:Custom win menu.png|Custom Window Menu]]
+
[[File:Custom win menu.png|thumbnail|Custom Window Menu]]
  
 
== Getting Info ==
 
== Getting Info ==
Line 116: Line 113:
 
| x, y, w, h || left, top, width, and height
 
| x, y, w, h || left, top, width, and height
 
|-
 
|-
| dx, dy, dw, dh || left, top, width and height position relative to the desktop
+
| dx, dy, dw, dh || left and top position relative to the desktop
 
|-
 
|-
 
| state || Returns the window's state (minimized/maximized/hidden/normal)
 
| state || Returns the window's state (minimized/maximized/hidden/normal)
Line 142: Line 139:
 
You can retrieve a line of text from a custom window using the $line identifier:
 
You can retrieve a line of text from a custom window using the $line identifier:
  
<syntaxhighlight lang="mirc">$line(@windowName, N, T)</syntaxhighlight>
+
<syntaxhighlight lang="mirc">$line(@windowName, N, M)</syntaxhighlight>
  
 
$lines returns the Nth line of text from a window. If N = 0, $lines returns the total number of lines in the window. If T = 1, the side-listbox will be used instead of the chatbox (default is 0).
 
$lines returns the Nth line of text from a window. If N = 0, $lines returns the total number of lines in the window. If T = 1, the side-listbox will be used instead of the chatbox (default is 0).
Line 148: Line 145:
 
You can also search the window for a line wild-matching a specific sequence.
 
You can also search the window for a line wild-matching a specific sequence.
  
<syntaxhighlight lang="mirc">$fline(@windowName, wildtext, N, T)</syntaxhighlight>
+
<syntaxhighlight lang="mirc">$fline(@windowName, wildtext, N, M)</syntaxhighlight>
  
This will return the Nth line wild-matching a specific wildtext sequence. If T = 1, the side-listbox will be used instead of the chatbox (default is 0).
+
This will return the Nth line wild-matching a specific wildtext sequence. If M = 1, the side-listbox will be used instead of the chatbox (default is 0).
  
 
If a listbox is used, you can use the $sline identifier to retrieve the Nth selected text.
 
If a listbox is used, you can use the $sline identifier to retrieve the Nth selected text.
Line 158: Line 155:
 
If N = 0, the total number of selected lines is returned. If the .ln property is used, the line number will be returned instead of the actual text.
 
If N = 0, the total number of selected lines is returned. If the .ln property is used, the line number will be returned instead of the actual text.
  
[[Category:mIRC|custom windows]]
+
[[Category:mIRC]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)