https://en.wikichip.org/w/api.php?action=feedcontributions&user=KindOne&feedformat=atomWikiChip - User contributions [en]2024-03-28T09:57:36ZUser contributionsMediaWiki 1.28.1https://en.wikichip.org/w/index.php?title=mirc/identifiers/$away&diff=102381mirc/identifiers/$away2024-03-28T04:20:40Z<p>KindOne: /* Compatibility */ This was added in 4.5</p>
<hr />
<div>{{mirc title|$away Identifier}}'''$away''' will return ''$true'' if you are currently away, otherwise it will return ''$false''.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$away</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example ==<br />
'''Echo away status to the active window'''<br />
<source lang="mIRC">//echo -a $away</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.5}}<br />
<br />
== See Also ==<br />
* {{mIRC|/away}}<br />
* {{mIRC|$awaymsg}}<br />
* {{mIRC|$awaytime}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|away]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$color&diff=102380mirc/identifiers/$color2024-03-28T04:09:15Z<p>KindOne: /* Compatibility */ American Spelling for "color" was added in 5.9</p>
<hr />
<div>{{mirc title|$color Identifier}}The '''$color''' identifier allows mIRC to return the color index number associated with the specified target/event, or return the RGB color for a color index number. $colour is an identical functioning identifier for those who find comfort using a 'u' to spell color.<br />
<br />
== Synopsis ==<br />
<pre>$color(name/N)[.dd]</pre><br />
== Parameters ==<br />
* '''name''' Returns the color index number for the specified name/action/event. Partial matches work as well: '''$color(action)'''<br />
* '''N''' Returns the 24-bit integer RGB color value for index N where N is 0-99, of which 0-98 are displayed in the '''CTRL+K''' list and the '''ALT+K''' window.<br />
<br />
== Properties ==<br />
*'''.dd''' When used with name, allows the color index numbers 0-9 to be returned in double-digit format, eg: 02 instead of 2. Does not work on RGB-returned values.<br />
== Names ==<br />
Most of the names are shown in the Alt+K dialog, and some of them use spaces due to similar name for the background color in that area. The names accepted by $color are the same names used by echo's -c switch. The names for the background colors are not shown:<br />
<source lang="mIRC"><br />
//echo -a $color(background)<br />
//echo -a $color(listbox)<br />
//echo -a $color(treebar)<br />
//echo -a $color(editbox)<br />
</source><br />
The only names requiring 'text' are those where the absence of 'text' would be the same name as any of the above four:<br />
<source lang="mIRC"><br />
//echo -a $color(listbox text)<br />
//echo -a $color(treebar text)<br />
//echo -a $color(editbox text)<br />
</source><br />
These names do not require quotes when used as the $color parameter, but do require quotes when used with echo's -c switch:<br />
<br />
<source lang="mIRC">/echo -ac "listbox text" test</source><br />
== Examples ==<br />
Echo the color index number for action events:<br />
<source lang="mIRC">//echo -a $color(action)</source><br />
If Index 0-9 are used for that event, displays a single number unless the .dd property is used:<br />
<source lang="mIRC">//echo -a $color(action).dd<br />
</source><br />
<br />
Echo the RGB code for index 4:<br />
<source lang="mIRC">//echo -a $color(4)</source><br />
<br />
<source lang="mIRC"><br />
//echo $color(ctcp) $chan this color changes when ctcp event color changes. it does not put color code into logfile<br />
//echo $chan $chr(3) $+ $color(ctcp) this color does not change when ctcp event color changes. it does put color code into logfile<br />
</source><br />
Using .dd prevents numeric first character of string being considered part of the color code, in the event the event's color index is 0-9.<br />
<source lang="mIRC"><br />
//var %string 123 | echo -a $chr(3) $+ $color(ctcp).dd $+ %string<br />
vs<br />
//var %string 123 | echo -a $chr(3) $+ $color(ctcp) $+ %string<br />
</source><br />
<br />
mIRC blocks the effect of $color if it matches the color used by the background for that text, except when used in the format ^Kn,n which sets the background along with the foreground. In attempting to avoid matching the background color, echo first tries $color(normal) to find a different color index then $color(gray). Invalid 'name' strings return 0.<br />
== Compatibility ==<br />
{{mIRC compatibility|5.9}}<br />
<br />
== See Also ==<br />
* {{mIRC|/color}}<br />
* {{mIRC|$colour}}<br />
* {{mIRC|$rgb}}<br />
* {{mIRC|/echo}}</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$appstate&diff=102379mirc/identifiers/$appstate2024-03-28T03:54:13Z<p>KindOne: /* Results */ Add normal</p>
<hr />
<div>{{mirc title|$appstate Identifier}}The '''$appstate''' identifier returns the current state of the mIRC application window.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$appstate</pre><br />
<br />
== Properties ==<br />
None<br />
<br />
== Results ==<br />
<span style="display: inline-block; width: 110px;">'''full'''</span>The mIRC application window size is full.<br />
<br />
<span style="display: inline-block; width: 110px;">'''hidden'''</span>The mIRC application window size is hidden.<br />
<br />
<span style="display: inline-block; width: 110px;">'''maximized'''</span>The mIRC application window size is maximized.<br />
<br />
<span style="display: inline-block; width: 110px;">'''minimized'''</span>The mIRC application window size is minimized.<br />
<br />
<span style="display: inline-block; width: 110px;">'''normal'''</span>The mIRC application window is using part of the screen.<br />
<br />
<span style="display: inline-block; width: 110px;">'''tray'''</span>The mIRC application window has been minimized to the Windows tray.<br />
<br />
== Example ==<br />
'''Echo the mIRC application window state to the active window'''<br />
<source lang="mIRC">//echo -a $appstate</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.7}}<br />
<br />
== See Also ==<br />
* {{mIRC|$locked}}<br />
* {{mIRC|$titlebar}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|appstate]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$sound&diff=102378mirc/identifiers/$sound2024-03-27T00:06:29Z<p>KindOne: /* Properties */ Fix .vbr</p>
<hr />
<div>{{mirc title|$sound identifier}}'''$sound''' is a powerful identifier that can be used to retrieve various information about sound files, including: directories which contain specific sounds file types, as well as [[ID3 tags]] associated with sound files which support them.<br />
<br />
'''Note:''' This identifier is also a part of the {{mIRC|playing music}} section.<br />
<br />
== Synopsis ==<br />
<pre>$sound(<type>)</pre><br />
<br />
Possible value for <type>:<br />
* mp3 - Return the mp3 folder<br />
* midi - Return the midi folder<br />
* wave - Return the wave folder<br />
<br />
$sound without parameters returns the default folder for music in general.<br />
<br />
<pre>$sound(filename>)[.property]</pre><br />
<br />
== Properties ==<br />
If used with a music filename, the following properties are available:<br />
<br />
'''Note:''' Only mp3, ogg, and wma files currently support the following properties. Keep in mind that not all properties may have been set. Each property returns the id3v1 values. For id3v2, use the ''.tag'', and ''.tags'' properties.<br />
<br />
: <span style="display: inline-block; width: 110px;">'''album'''</span>Retrieves the specified album name sound file.<br />
: <span style="display: inline-block; width: 110px;">'''title'''</span>Returns the song title for the file.<br />
: <span style="display: inline-block; width: 110px;">'''artist'''</span>Returns the artist name for the file.<br />
: <span style="display: inline-block; width: 110px;">'''year'''</span>Returns the year associated with the song release.<br />
: <span style="display: inline-block; width: 110px;">'''comment'''</span>Returns any comments made by the file creator.<br />
: <span style="display: inline-block; width: 110px;">'''genre'''</span>Grabs the genre for the file, if set.<br />
: <span style="display: inline-block; width: 110px;">'''track'''</span>Retrieves the track number associated with the song.<br />
: <span style="display: inline-block; width: 110px;">'''length'''</span>Returns the full length of the song in milliseconds.<br />
: <span style="display: inline-block; width: 110px;">'''version'''</span>Gets the version number of the song, or track.<br />
: <span style="display: inline-block; width: 110px;">'''bitrate'''</span>Returns the [[bitrate]] for the file.<br />
: <span style="display: inline-block; width: 110px;">'''vbr'''</span>Returns ''$true'' or ''$false'' if variable bit rate is found.<br />
: <span style="display: inline-block; width: 110px;">'''sample'''</span>Returns the [[sampling frequency]].<br />
: <span style="display: inline-block; width: 110px;">'''mode'''</span>Returns the mode: ''mono'', ''stereo'', etc.<br />
: <span style="display: inline-block; width: 110px;">'''copyright'''</span>Returns any copyright information.<br />
: <span style="display: inline-block; width: 110px;">'''private'''</span>Returns ''$true'' or ''$false'' for the private tag.<br />
: <span style="display: inline-block; width: 110px;">'''crc'''</span>Returns ''$true'' or ''$false'' if crc is found.<br />
: <span style="display: inline-block; width: 110px;">'''.id3'''</span>Returns the [[id3]] tag information.<br />
: <span style="display: inline-block; width: 110px;">'''.tag'''</span>Used to retrieve [[id3v2]] information.<br />
: <span style="display: inline-block; width: 110px;">'''.tags'''</span>Used to retrieve [[id3v2]] information.<br />
<br />
== Examples ==<br />
Echo the artist name of the currently playing mp3 file to the active window:<br />
<source lang="mIRC">//echo -a $sound($insong.fname).artist</source><br />
<br />
Create a small alias that will open a window, @id3info, and echo some basic info about the currently playing song to it:<br />
<source lang="mIRC">alias id3info {<br />
<br />
; First, we check to make sure we currently have an mp3, ogg, or wma file playing<br />
if ($insong) {<br />
<br />
; If the @id3info window is open, clear it, otherwise create it.<br />
$iif($window(@id3info),clear @id3info,window @id3info)<br />
<br />
echo @id3info Artist: $sound($insong.fname).artist<br />
echo @id3info Track: $sound($insong.fname).track<br />
echo @id3info Title: $sound($insong.fname).title<br />
echo @id3info Album: $sound($insong.fname).album<br />
<br />
; The below calculation converts the milliseconds for the sound<br />
; file length into the format mm:ss, or minutes:seconds. Note that<br />
; this does not properly support lengths over 59 minutes and 59<br />
; seconds long.<br />
echo @id3info Length: $replace($round($calc($sound($insong.fname).length / 1000 / 60),2),.,:)<br />
echo @id3info Year: $sound($insong.fname).year<br />
}<br />
}</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.0}}<br />
<br />
== See Also ==<br />
* {{mIRC|playing music}}<br />
* {{mIRC|on midiend}}<br />
* {{mIRC|on mp3end}}<br />
* {{mIRC|on nosound}}<br />
* {{mIRC|on waveend}}<br />
* {{mIRC|$inmidi}}<br />
* {{mIRC|$insong}}<br />
* {{mIRC|$inwave}}<br />
* {{mIRC|$vol}}<br />
* {{mIRC|/splay}}<br />
* {{mIRC|/vol}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|sound]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=User_talk:David&diff=102367User talk:David2024-03-20T00:15:34Z<p>KindOne: /* Opensource mSLDev */</p>
<hr />
<div>==Adding Ampere Altra processor==<br />
<br />
Hi David, may you add the Ampere Altra processor please ?<br />
<br />
ref: https://d1o0i0v5q5lp8h.cloudfront.net/ampere/live/assets/documents/Altra_Rev_A1_PB_v1.35_20220728.pdf<br />
<br />
==reintroducing sidebar menu==<br />
Hi I see you've been trying to fix the sidebar extension so that it works for 1.25. If you need any help I can provide assistance! --[[User:Jon|<font color="green" size="2px">Jonathan</font>]] ([[User talk:Jon|<font color="blue" size="2px">talk</font>]]) 12:31, 14 November 2015 (EST)<br />
:I've got it covered for now, thanks! I think I'll upload the source to githup seeing how the extension has not been maintained for 1.24+. Might be useful for other wikis. --[[User:David|David]] ([[User talk:David|talk]]) 17:04, 16 November 2015 (EST)<br />
<br />
==Who are we?==<br />
Hi David, how long has this site been around without me noticing it? I found it today when googling for an old chip I found in a drawer at work, the MB8855. I have previously been involved in the ChipDir-project which seems to have faded away, as well as in the HardwareBook. I will come back here and dump a lot of missing info I guess! --[[User:Uwezi|Uwezi]] ([[User talk:Uwezi|talk]]) 07:03, 28 February 2017 (EST)<br />
<br />
: Hey Uwe,<br />
: Awesome that you found us! It's always great to meet people who share similar interests. We started the site a few years ago, but it wasn't until last year that we really started getting the ball rolling with an attempt to detail all those old chips that have been pretty much been forgotten as well as some of the new stuff (most recently {{amd|Zen}}/{{intel|Kaby Lake}}). We being myself and a few friends who are also engineers in the field who have great passion for those chips/systems. We are currently trying to at least document the various chip families from each company. I've also been trying to get my hand on some old databooks so they could be digitized. So welcome to WikiChip! --[[User:David|David]] ([[User talk:David|talk]]) 12:03, 28 February 2017 (EST)<br />
<br />
== Email verification not working (2017Q1) ==<br />
<br />
Hi David,<br />
<br />
Email verification doesn't seem to be working: 'Unknown error in PHP's mail() function.'<br />
I tried stripping out the comment characters (which trip up some email address regexes) as well as resetting the address - both of attempts yielded the same error message. --[[User:Chipocalypse|Chipocalypse]] ([[User talk:Chipocalypse|talk]]) 16:03, 27 March 2017 (EDT)<br />
<br />
: Hi, thanks for letting me know. I think it should be fixed now. Looks like it was broken configs from when I upgraded recently. --[[User:David|David]] ([[User talk:David|talk]]) 18:27, 27 March 2017 (EDT)<br />
<br />
== SSL Cert expiring ==<br />
<br />
Hey David, just a heads up the SSL Cert is about to expire! --[[User:At32Hz|At32Hz]] ([[User talk:At32Hz|talk]]) 13:57, 3 June 2017 (EDT)<br />
<br />
: It's been renewed. Thanks! --[[User:David|David]] ([[User talk:David|talk]]) 23:07, 3 June 2017 (EDT)<br />
<br />
== Telling google not to index parts of a page ==<br />
<br />
Hey David, I need to not to index some of the mIRC pages (like the index templates such as https://en.wikichip.org/wiki/Template:mIRC_identifier_list ) in order to stop google coming up with every identifier page when you search for a specific identifier. To do this I need to insert specific HTML googleoff and googleon comments as per https://perishablepress.com/tell-google-to-not-index-certain-parts-of-your-page/ . How do I do this? [[User:Sophist|Sophist]] ([[User talk:Sophist|talk]]) 18:14, 2 October 2017 (EDT)<br />
<br />
:: I thought I've done that. Let me double check. --[[User:David|David]] ([[User talk:David|talk]]) 18:35, 2 October 2017 (EDT)<br />
<br />
::: Looks like I only had talk pages not indexed, I've extended it to template pages too. So [[Template:mIRC_identifier_list]] should not be indexed anymore either now. This is applied site-wide. --[[User:David|David]] ([[User talk:David|talk]]) 21:36, 2 October 2017 (EDT)<br />
<br />
:::: What I was intending is '''NOT''' the same as NOINDEX. NOINDEX applies to the whole page. What I am trying to do is exclude specific parts of the page (i.e. the bits that are repeated on every page) from the index. [[User:Sophist|Sophist]] ([[User talk:Sophist|talk]]) 03:18, 3 October 2017 (EDT)<br />
<br />
::::: ah just part of page. Unfortunately that's not possible. I don't think there is any way to cloak part of the page. Btw googleon/googleoff only works for custom google searches (like if someone embeds it in their website), it doesn't work for google.com itself. As a side note, comments get stripped by MediaWiki so no one can see them because they won't show up in the HTML on the site. <br />
<br />
::::: Is it really a big problem? Seems google is good enough to understand those links are repeated at every page and ignore them. Like if you search for "mirc $XXXXX identifier" I get the right page every time? --[[User:David|David]] ([[User talk:David|talk]]) 10:52, 3 October 2017 (EDT)<br />
<br />
:::::: You can do it (for google at least) using HTML comments containing googleon and googleoff. But I am unable (or don't know how) to include html comments in the wiki generated html. [[User:Sophist|Sophist]] ([[User talk:Sophist|talk]]) 11:10, 3 October 2017 (EDT)<br />
<br />
::::::: googleon/googleoff only works for Google Search Appliance (https://www.google.com/support/enterprise/static/gsa/docs/admin/70/gsa_doc_set/admin_crawl/preparing.html#1076243) it's not meant for google search bot/google.com search engine. See the comment on the link of the page you provided too --[[User:David|David]] ([[User talk:David|talk]]) 16:29, 3 October 2017 (EDT)<br />
<br />
Thinking laterally (and I am not talking about moving the conversation back to left-margin), how about using user agent strings to exclude certain content - so when it's the googlebot or bingbot then you don't include these sorts of templates. [[User:Sophist|Sophist]] ([[User talk:Sophist|talk]]) 17:23, 3 October 2017 (EDT)<br />
<br />
== Can no longer make edits. ==<br />
<br />
The wiki only allows me to edit discussion pages. Any text on a page edit informs me that it's an external web address, and discards my edit. - [[User:Raccoon|Raccoon]] ([[User talk:Raccoon|talk]]) 02:02, 13 August 2018 (EDT)<br />
* Sorry for my english. Edit wikitext for acticles and categories not working (only move, watch, purge), even for [[User:Oleg3280|my page]]? Thanks. [[User:Oleg3280|Oleg3280]] ([[User talk:Oleg3280|talk]]) 13:28, 12 September 2019 (EDT)<br />
* I dont understand, what is Spell "box" backwards on [[WikiChip talk:general discussion]]? [[User:Oleg3280|Oleg3280]] ([[User talk:Oleg3280|talk]]) 13:28, 12 September 2019 (EDT)<br />
<br />
:: Is it still happening? --[[User:David|David]] ([[User talk:David|talk]]) 23:33, 22 September 2019 (EDT)<br />
::: In my preferences was ru language. I select en, and edit now work. Thanks for this website. [[User:Oleg3280|Oleg3280]] ([[User talk:Oleg3280|talk]]) 10:20, 12 October 2019 (EDT)<br />
<br />
== Templates?! ==<br />
<br />
Hi David, are there any templates available? Was thinking of starting a series of pages about Intel's Core 2 Duo line but it would take me forever to write one page without a template.<br />
--[[Special:Contributions/188.240.26.38|188.240.26.38]] 08:49, 8 June 2020 (EDT)<br />
<br />
<br />
== Opensource mSLDev ==<br />
<br />
Can you put msldev on github/bitbucket/gitlab/whatever? Please? I'd like to try to get it to work on newer commands, identifiers, and events. Thanks.<br />
<br />
I would also appreciate this! (sroelse)<br />
<br />
Any update on this? You have never responded.<br />
<br />
== High Resolution Pictures ==<br />
Hello David, I just came across wikichip.org. Great site! Keep it up! I directly bookmarked it to stop by here and there.<br />
Quick question, do you have a high resolution picture of the eyeq5 PCB from BMW, that you showed here: https://en.wikichip.org/w/images/a/a1/mobileye_eyeq5_bmw_2021_board.jpg I am interested in seeing more details on the traces and the single components of this PCB. (It's a pity, that the manufacturer don't print details on their ceramic capacitors :)) Best Regards, Sam [[Special:Contributions/217.229.171.177|217.229.171.177]] 03:45, 21 September 2021 (EDT)<br />
<br />
: Hi there. Sorry, this isn't my photo (which is why the resolution is fairly low). It happens to be a photo provided by Intel/Mobileye itself so that's the resolution it came at originally (we don't downscale photos). --[[User:David|David]] ([[User talk:David|talk]]) 08:26, 21 September 2021 (EDT)<br />
<br />
:: Hi David, alright. That's unfortunate. Thanks for getting back! Sam [[Special:Contributions/217.229.171.177|217.229.171.177]] 05:21, 29 September 2021 (EDT)<br />
<br />
== Properties ==<br />
Hi David, when I edit declarative properties on a Property: page the changes don't take effect. [[User:QuietRub|QuietRub]] ([[User talk:QuietRub|talk]]) 20:15, 9 November 2021 (EST)<br />
<br />
== 4LPE and 5LPE design rules ==<br />
Hi David, I just fixed an apparent error in https://en.wikichip.org/wiki/5_nm_lithography_process but since I don't have original sources or first-hand data on 4LPE/5LPE design rules, and the tables don't cite any sources either, I would suggest you check the edit and add sources for 4LPE/5LPE design rules (and other processes, time permitting) used when making this page. <br />
<br />
Edit: https://en.wikichip.org/w/index.php?title=5_nm_lithography_process&type=revision&diff=100069&oldid=99958<br />
<br />
With kind regards,<br />
AM.<br />
<br />
==Spam==<br />
Hi David, You're probably aware of this but there's a severe spam problem. I've been reverting it when I spot it, some are very subtle changes to articles that are just weird but it's getting worse. Please respond here with what you end up doing and so I can make an account before you close off IP access (if you use that tool) - if not just make sure you patrol and watch every page basically. Good luck<br />
: [[Special:Contributions/90.219.59.92|90.219.59.92]] 23:58, 10 March 2023 (EST)<br />
<br />
<br />
:: Much of the recent spam is very subtle changes and I have no idea how to deal with it unfortunately (other than blocking out large swaths of IP addresses/subnets). If you want to create an account, I can temporarily open it up so you can register. --[[User:David|David]] ([[User talk:David|talk]]) 11:50, 15 March 2023 (EDT)<br />
<br />
== Module:packaging data ==<br />
Hi David. Module pages on Wikichip are not editable by mere mortals and as of 2023-03-13 [[Module:packaging data]] is missing entries for AMD socket AM5 and SP5, maybe you could add those? This also exposes a bug in [[Module:chip]] and [[Module:core]], which is getting in the way of editing pages referencing those sockets, where they attempt to access <code>package_info</code> fields without checking if this came up nil:<br />
<br />
<source lang="Lua"><br />
local package_info = pdata['packages'][package_location[1]][package_location[2]]<br />
</source><br />
<br />
Alternatively I propose Module:chip and Module:core try to retrieve that data from the SMW database and also link to a package page <span class="plainlinks">[https://en.wikichip.org/wiki/Category:all_ic_packages if one exists]</span>, example below. You will notice the code accepts a page name like "amd/packages/socket am4" in addition to "vendor,name" which I think beats guessing names in the pdata table. In fact even "Socket AM4" would work in this case because that happens to be a redirect to that page.<br />
<br />
<source lang="Lua"><br />
[...]<br />
</source><br />
<br />
Of course it would help if [[Module:package]], which already accepts the required data as parameters, would set corresponding package and socket properties, as below for instance. Note the example adds a missing 'package pitch 2' parameter and limits 'package dimension' to three values rather than ten. The proposed property names were already used in subobjects by templates like [[Template:packages/cavium/fcbga-1217]] invoked by the obsolete Module:chip 'package module' parameter. I would prefer a property 'package contacts' over 'package pins' though. Regrettably most of these properties are currently undefined and default to type Page <span class="plainlinks">([https://en.wikichip.org/w/index.php?title=Special%3AProperties&property=package 1] [https://en.wikichip.org/w/index.php?title=Special%3AProperties&property=socket 2])</span> so they won't display nicely. For another obstacle on Wikichip property page changes do not seem to enter the SMW database voluntarily. Take for instance [[Property:l1$ size]] which requests to be displayed in KiB but shows MiB, or [[Property:integrated gpu execution units]] which is typed as Number but still defaults to Page. Also package properties may not enter the database immediately even if listed in a package page fact box, a [[Special:Ask/-5B-5BCategory-3Aall-20ic-20packages-5D-5D/-5B-5Bamd-2Fpackages-2Fsocket_sp5-5D-5D/-3Fpackage/-3Fpackage-20type/-3Fpackage-20pins/-3Fpackage-20pitch/-3Fpackage-20length/-3Fpackage-20width/-3Fpackage-20height/-3Fsocket|manual query]] will show the problem.<br />
<br />
<source lang="Lua"><br />
[...]<br />
</source><br />
<br />
Kind regards, [[User:QuietRub|QR]] ([[User talk:QuietRub|talk]]) 03:47, 13 March 2023 (EDT)<br />
<br />
: Thanks for the admin rights. I made the proposed changes, seems to work as planned. May I suggest an infobox class for Module:chip, core, microarchitecture, and package? They duplicate a lot of code, it could be more readable, and shared code would promote a common appearance. For instance core and package use in-text annotations to set properties, so e.g. [[amd/cores/milan]] displays a warning about the "7 nm+" process using an unknown unit. SMW also displays conversion pop-ups for quantity properties, perhaps useful to compare metric and customary units like inches or mils. Module:chip and microarchitecture use #set exclusively, so [[apple/ax/a12x]] has no pop-ups and is quiet about several improper values and why 'base frequency' is not set. Well an infobox class taking care of such details could do either and switch easily. [[User:QuietRub|QR]] ([[User talk:QuietRub|talk]]) 02:36, 2 April 2023 (EDT)<br />
<br />
== Semantic citations ==<br />
What is your opinion on semantic citations? Citations are useful to track obscure facts or record documents which may be of interest to other researchers, but one has to look up document details (title, author, publication date, URL, etc.) every time, corrections on multiple pages e.g. when the URL changes are laborious, and long references clutter up the page. Semantic citations would keep all the details in semantic properties on one page and use a query to insert them on other pages.<br />
<br />
There is a promising [https://www.mediawiki.org/wiki/Extension:Semantic_Cite Semantic Cite extension], however it comes with downsides such as not being installed on Wikichip, using admin-only pages to control its operation, enforcing conventions like having a single list of references at the bottom of the page (unlike e.g. {{amd|CPUID}}), and not cooperating with the Cite extension so if documents outside the SMW database are referenced one may end up with two reference tables. Fortunately something similar can be implemented using basic SMW features and templates:<br />
<br />
Each citable document has a page which sets properties containing the document details. That could be a File: page although for copyright reasons I would expect more often an ordinary, very short page with an external link to the document. Another option, not mutually exclusive, is to store details in one subobject per document. Subobjects can be placed on pages listing documents in any number, and a template can help structure the data. Subobjects have no name or category but a query can find "citation resource" subobjects because they all set a citation_key property. The key is one way to retrieve document data, and a suitable template can format it. A less taxing option is to format the citation at the source, a side effect of the subobject template, and store the output in a citation_text property. A Template:cite would simply insert the retrieved citation_text in a page, e.g. in the bibliography section. A Template:citeref can create a reference by adding &lt;ref> tags. Document tables could be produced in the same way as chip tables, with free text search in titles or keywords, the subobject template setting additional properties as needed. [[User:QuietRub|QR]] ([[User talk:QuietRub|talk]]) 02:36, 2 April 2023 (EDT)</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$menubar&diff=102358mirc/identifiers/$menubar2024-03-02T16:17:09Z<p>KindOne: /* See also */ Correct typo</p>
<hr />
<div>{{mirc title|$menubar Identifier}}The '''$menubar''' identifier returns 1 if the menubar is enabled in mIRC, 0 otherwise.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$menubar</pre><br />
<br />
== Paramters ==<br />
<br />
None<br />
<br />
== Properties ==<br />
<br />
None<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $menubar</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.32}}<br />
<br />
== See also ==<br />
* {{mIRC|$switchbar}}<br />
* {{mIRC|$toolbar}}<br />
* {{mIRC|$treebar}}<br />
* {{mIRC|/menubar}}<br />
{{mIRC identifier list}}<br />
[[Category:mIRC identifiers|menubar]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$compact&diff=102357mirc/identifiers/$compact2024-03-02T16:16:01Z<p>KindOne: This identifier uses 0/1, not $true/$false.</p>
<hr />
<div>{{mirc title|$compact Identifier}}The '''$compact''' identifier returns 1 if compact mode is enabled in mIRC, 0 otherwise.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$compact</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example ==<br />
Echo whether or not mIRC is in compact mode to the active:<br />
<source lang="mIRC">//echo -a $compact</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.32}}<br />
<br />
== See Also ==<br />
* {{mIRC|$menubar}}<br />
* {{mIRC|$switchbar}}<br />
* {{mIRC|$toolbar}}<br />
* {{mIRC|$treebar}}<br />
* {{mIRC|/menubar}}<br />
* {{mIRC|/switchbar}}<br />
* {{mIRC|/toolbar}}<br />
* {{mIRC|/treebar}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|compact]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$menubar&diff=102356mirc/identifiers/$menubar2024-03-02T16:15:59Z<p>KindOne: This identifier uses 0/1, not $true/$false.</p>
<hr />
<div>{{mirc title|$menubar Identifier}}The '''$menubar''' identifier returns 1 if the menubar is enabled in mIRC, 0 otherwise.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$menubar</pre><br />
<br />
== Paramters ==<br />
<br />
None<br />
<br />
== Properties ==<br />
<br />
None<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $menubar</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.32}}<br />
<br />
== See also ==<br />
* {{mIRC|$switchbar}}<br />
* {{mIRC|$toolbar}}<br />
* {{mIRC|$treebar}}<br />
* {{mIRC/menubar}}<br />
{{mIRC identifier list}}<br />
[[Category:mIRC identifiers|menubar]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$toolbar&diff=102355mirc/identifiers/$toolbar2024-03-02T16:15:54Z<p>KindOne: This identifier uses 0/1, not $true/$false.</p>
<hr />
<div>{{mirc title|$toolbar identifier}}The '''$toolbar''' identifier returns 1 if the toolbar is enabled in mIRC, 0 otherwise. It also returns information about the items on the toolbar.<br />
== Synopsis ==<br />
<pre>$toolbar</pre><br />
<pre>$toolbar(name|N)</pre><br />
<br />
== Parameters ==<br />
None<br /><br />
or<br /><br />
Name|N = Name or Nth item in toolbar about which to return information. 0 = total number of toolbar items.<br />
<br />
== Properties ==<br />
* .name<br />
* .type<br />
* .tip<br />
* .alias<br />
* .popup<br />
* .width<br />
* .height<br />
* .wide<br />
* .enabled<br />
* .visible<br />
* .checked<br />
* .alpha<br />
<br />
== Example ==<br />
<source lang="mIRC"><br />
//echo -a the toolbar is $iif($toolbar,On,Off) and contains $toolbar(0) items<br />
//var %i 0 | while (%i < $toolbar(0)) { echo -a %i : $toolbar(%i).name : $toolbar(%i).tip | inc %i }<br />
</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.32}}<br />
== See also ==<br />
* {{mIRC|$menubar}}<br />
* {{mIRC|$switchbar}}<br />
* {{mIRC|$treebar}}<br />
* {{mIRC|/toolbar}}<br />
<br />
[[Category:mIRC identifiers|toolbar]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$treebar&diff=102354mirc/identifiers/$treebar2024-03-02T16:15:53Z<p>KindOne: This identifier uses 0/1, not $true/$false.</p>
<hr />
<div>{{mirc title|$treebar identifier}}The '''$treebar''' identifier returns 1 if the treebar is enabled in mIRC, 0 otherwise.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$treebar</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
None<br />
<br />
== Results ==<br />
<span style="display: inline-block; width: 30px;">'''0'''</span>The treebar is currently off.<br /><br />
<span style="display: inline-block; width: 30px;">'''1'''</span>The treebar is currently on.<br />
<br />
== Example ==<br />
Echo the treebar status to the active window:<br />
<pre>//echo -a $treebar</pre><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.32}}<br />
<br />
= See also =<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|/treebar}}<br />
* {{mIRC|$switchbar}}<br />
* {{mIRC|$toolbar}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|treebar]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$switchbar&diff=102353mirc/identifiers/$switchbar2024-03-02T16:15:48Z<p>KindOne: This identifier uses 0/1, not $true/$false.</p>
<hr />
<div>{{mirc title|$switchbar identifier}}The '''$switchbar''' identifier returns 1 if the switchbar is enabled in mIRC, 0 otherwise.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$switchbar</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
None<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $switchbar</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.32}}<br />
<br />
== See also ==<br />
* {{mIRC|$menubar}}<br />
* {{mIRC|$toolbar}}<br />
* {{mIRC|$treebar}}<br />
* {{mIRC|/switchbar}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|switchbar]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$v2&diff=102351mirc/identifiers/$v22024-02-23T22:19:03Z<p>KindOne: /* Notes */ Correct typo.</p>
<hr />
<div>{{mirc title|$v2 Identifier}}The '''$v2''' identifier returns the value of the right-hand operand of the most recently executed conditional statement. This identifier is equivalent to the deprecated {{mIRC|$ifmatch2}} identifier.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$v2</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
None<br />
<br />
== Notes ==<br />
Just like $v1, $ifmatch and $ifmatch2, this identifier return the value from the very last conditional statement executed. Conditional statements include:<br />
* {{mirc|/if}}<br />
* {{mirc|$iif}}<br />
* {{mirc|/while}}<br />
<br />
<source lang="mIRC"><br />
alias test return $iif($1 == 1,1,2)<br />
alias testing if (a != b) echo -a $test(1) $v2<br />
</source><br />
This will echo 1 for $v2 because $test is evaluated before $v2, so the $iif is the last statement made when $v2 evaluates.<br />
<br />
== Examples ==<br />
Check if two random numbers between 1 and 5 are equivalent, and echo the matching numbers if so:<br />
<source lang="mirc">//echo -ga $iif($rand(1,5) == $rand(1,5),Yes! $v1 == $v2,No! $v1 != $v2) $+ !</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.16}}<br />
<br />
== See also ==<br />
*[[Conditional statements - mIRC|If then else]]<br />
*[[While Loops - mIRC|While loops]]<br />
*{{mIRC|$v1}}<br />
*{{mIRC|$ifmatch}}<br />
*{{mIRC|$ifmatch2}}<br />
*{{mirc|/if}}<br />
*{{mirc|$iif}}<br />
*{{mirc|/while}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|v2]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$color&diff=102350mirc/identifiers/$color2024-02-23T22:08:57Z<p>KindOne: /* Parameters */ CTRL+K goes 0 - 98</p>
<hr />
<div>{{mirc title|$color Identifier}}The '''$color''' identifier allows mIRC to return the color index number associated with the specified target/event, or return the RGB color for a color index number. $colour is an identical functioning identifier for those who find comfort using a 'u' to spell color.<br />
<br />
== Synopsis ==<br />
<pre>$color(name/N)[.dd]</pre><br />
== Parameters ==<br />
* '''name''' Returns the color index number for the specified name/action/event. Partial matches work as well: '''$color(action)'''<br />
* '''N''' Returns the 24-bit integer RGB color value for index N where N is 0-99, of which 0-98 are displayed in the '''CTRL+K''' list and the '''ALT+K''' window.<br />
<br />
== Properties ==<br />
*'''.dd''' When used with name, allows the color index numbers 0-9 to be returned in double-digit format, eg: 02 instead of 2. Does not work on RGB-returned values.<br />
== Names ==<br />
Most of the names are shown in the Alt+K dialog, and some of them use spaces due to similar name for the background color in that area. The names accepted by $color are the same names used by echo's -c switch. The names for the background colors are not shown:<br />
<source lang="mIRC"><br />
//echo -a $color(background)<br />
//echo -a $color(listbox)<br />
//echo -a $color(treebar)<br />
//echo -a $color(editbox)<br />
</source><br />
The only names requiring 'text' are those where the absence of 'text' would be the same name as any of the above four:<br />
<source lang="mIRC"><br />
//echo -a $color(listbox text)<br />
//echo -a $color(treebar text)<br />
//echo -a $color(editbox text)<br />
</source><br />
These names do not require quotes when used as the $color parameter, but do require quotes when used with echo's -c switch:<br />
<br />
<source lang="mIRC">/echo -ac "listbox text" test</source><br />
== Examples ==<br />
Echo the color index number for action events:<br />
<source lang="mIRC">//echo -a $color(action)</source><br />
If Index 0-9 are used for that event, displays a single number unless the .dd property is used:<br />
<source lang="mIRC">//echo -a $color(action).dd<br />
</source><br />
<br />
Echo the RGB code for index 4:<br />
<source lang="mIRC">//echo -a $color(4)</source><br />
<br />
<source lang="mIRC"><br />
//echo $color(ctcp) $chan this color changes when ctcp event color changes. it does not put color code into logfile<br />
//echo $chan $chr(3) $+ $color(ctcp) this color does not change when ctcp event color changes. it does put color code into logfile<br />
</source><br />
Using .dd prevents numeric first character of string being considered part of the color code, in the event the event's color index is 0-9.<br />
<source lang="mIRC"><br />
//var %string 123 | echo -a $chr(3) $+ $color(ctcp).dd $+ %string<br />
vs<br />
//var %string 123 | echo -a $chr(3) $+ $color(ctcp) $+ %string<br />
</source><br />
<br />
mIRC blocks the effect of $color if it matches the color used by the background for that text, except when used in the format ^Kn,n which sets the background along with the foreground. In attempting to avoid matching the background color, echo first tries $color(normal) to find a different color index then $color(gray). Invalid 'name' strings return 0.<br />
== Compatibility ==<br />
{{mIRC compatibility|5.3}}<br />
== See Also ==<br />
* {{mIRC|/color}}<br />
* {{mIRC|$colour}}<br />
* {{mIRC|$rgb}}<br />
* {{mIRC|/echo}}</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$play&diff=102348mirc/identifiers/$play2024-02-23T02:23:37Z<p>KindOne: /* Properties */ Add paused response for .status</p>
<hr />
<div>{{mirc title|$play Identifier}}'''$play''' returns informations about queued /play request<br />
<br />
<br />
== Synopsis ==<br />
<pre>$play(N)<br />
or<br />
$play(nick,N)<br />
</pre><br />
<br />
== Paramters ==<br />
* '''nick''' - if you specify a nick, it returns how many play requests an user has in the queue.<br />
* '''N''' - The Nth /play request queued<br />
<br />
== Properties ==<br />
* '''.type''' - returns the type of the request, "topic" if you are using {{mIRC|/play|/play -t}}, "file" otherwise<br />
* '''.fname''' - returns the complete filename used for the play request<br />
* '''.topic''' - returns the name of the topic if you used {{mIRC|/play|/play -t}}<br />
* '''.pos''' - returns the number of the line that play request is at, (the next line to be played)<br />
* '''.lines''' - returns the total number of lines in the file being played<br />
* '''.delay''' - returns the delay used for the play request (default to 1000)<br />
* '''.status''' - returns the status of the play request, "playing", "paused", or "queued"<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $play(0)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.82}}<br />
<br />
== See Also ==<br />
{{mIRC|/play}}<br />
<br />
[[Category:mIRC identifiers]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$port&diff=102347mirc/identifiers/$port2024-02-23T02:11:10Z<p>KindOne: /* Compatibility */ This was added in 4.52</p>
<hr />
<div>{{mirc title|$port identifier}}'''$port''' returns the port number of the server to which you are currently connected.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$port</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
None<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $port</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.52}}<br />
<br />
== See Also ==<br />
* {{mIRC|$server}}<br />
* {{mIRC|$serverip}}<br />
{{mIRC identifier list}}<br />
[[Category:mIRC identifiers|port]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/resetidle&diff=102346mirc/commands/resetidle2024-02-21T23:13:11Z<p>KindOne: /* Compatibility */ This was added in 5.3</p>
<hr />
<div>{{mirc title|/resetidle Command}}<br />
The '''/resetidle command''' resets the {{mIRC|$idle}} identifier to zero or to the number of seconds you specify.<br />
<br />
== Synopsis ==<br />
/resetidle [seconds]<br />
<br />
== Switches ==<br />
None<br />
<br />
== Parameters ==<br />
* '''[seconds]''' - If specified, reset the $idle identifier to that number of seconds.<br />
<br />
== Example ==<br />
<source lang="mIRC">/resetidle 5</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.3}}<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$idle}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|resetidle command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$null&diff=102345mirc/identifiers/$null2024-02-21T22:14:55Z<p>KindOne: /* Compatibility */ This was added in 4.5</p>
<hr />
<div>{{mirc title|$null identifier}}'''$null''' does not return a value; just like {{mIRC|$true}} or {{mIRC|$timeout}}, it's a value you can use in comparison in {{mIRC|/if}} or {{mIRC|/while}}. An empty variable also returns '''$null'''.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$null</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
None<br />
<br />
== Example ==<br />
<br />
If you created an empty variable without assigning a value, then you can check its existence and emptiness like this:<br />
<source lang="mIRC"><br />
set %somevar<br />
if ($var(%somevar)) echo -a This variable exists.<br />
if (%somevar == $null) echo -a This variable is empty and has no value.<br />
</source><br />
<br />
<br />
<source lang="mIRC">//if ($? != $null) echo -a you entered $v1</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.5}}<br />
<br />
== See also ==<br />
* {{mIRC|$false}}<br />
* {{mIRC|$true}}<br />
* {{mIRC|$var}}<br />
* {{mirc|identifiers|List of identifiers}}<br />
{{mIRC identifier list}}<br />
[[Category:mIRC identifiers|null]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$did&diff=102344mirc/identifiers/$did2024-02-21T22:03:22Z<p>KindOne: Use complete words.</p>
<hr />
<div>{{mirc title|$did Identifier}}The '''$did''' identifier allows you to get the settings and values of controls in a dialog and use them to assist in performing the functions of buttons, radio boxes, etc.<br />
<br />
<br />
== Synopsis ==<br />
$did(<name>,<id>,[N])[.property]<br />
<br />
'''Note:''' Inside the on dialog event, you can omit the whole dialog <name> parameter:<br />
<br />
$did(<id>,[N])[.property]<br />
<br />
<br />
== Properties ==<br />
* '''text''' - returns line or Nth line<br />
* '''len''' - returns length of line or length of Nth line <br />
* '''lines''' - returns number of lines<br />
* '''sel''' - returns line number of Nth selected line<br />
* '''seltext''' - returns selected text in an editbox, or first selected item in a listbox<br />
* '''selstart''' - returns selected start character in the editbox<br />
* '''selend''' - returns selected end character in editbox line<br />
* '''edited''' - returns $true if text in editbox was changed, and is not empty.<br />
* '''state''' - returns state of checkboxes, radio buttons, 0 = off, 1 = on, 2 = indeterminate (for 3stage checkbox)<br />
* '''next''' - returns id of next control in order of tab keypress.<br />
* '''prev''' - returns id of previous control in order of tab keypress.<br />
* '''visible''' - returns $true if control is visible, otherwise $false<br />
* '''enabled''' - returns $true if control is enabled, otherwise $false<br />
* '''isid''' - returns $true if id exists in the dialog, otherwise $false<br />
* '''csel''' - returns line number of Nth checked box in a list checkbox control, if N = 0, returns number of checkmarked lines<br />
* '''cstate''' - returns 0 = off, 1 = on for item in a list checkbox control<br />
<br />
== Parameters ==<br />
* '''<name>''' - name of the dialog<br />
* '''<id>''' - id of the controls<br />
* '''[N]''' - usually a line number, it can also be an id number with menus, use 0 if you want to access the editbox of a combo control.<br />
* '''[.property]''' - used to check features of the dialog id, such as button state, selected line in a combo control, or number of lines in an editbox.<br />
<br />
== Example ==<br />
This example will monitor what events are triggering, what event ID is triggering the event, and any current captions or titles of the event ID which triggered an event. Created a custom [[Aliases - mIRC|alias]] called ''/whatEvents'' which will open up the local [[Dialogs - mIRC|dialog]] ''whatEvents'':<br />
<source lang="mIRC">alias whatEvents dialog - $+ $iif($dialog(whatEvents),v,m) whatEvents whatEvents<br />
dialog -l whatEvents {<br />
title "Events? What Events?"<br />
size -1 -1 136 112<br />
option dbu<br />
text "Event Type", 1, 8 8 73 8<br />
text "", 2, 82 8 49 8<br />
text "Event Item ID", 3, 8 18 73 8<br />
text "", 4, 82 18 49 8<br />
text "Event Item Caption/Value", 5, 8 28 73 8<br />
text "", 6, 82 28 49 7<br />
button "Click me", 7, 8 40 37 12<br />
edit "Type in me", 8, 48 40 66 13<br />
check "Check/Uncheck Me", 9, 8 64 58 10<br />
text "0", 10, 8 73 58 10<br />
text "Scroll Me", 11, 72 64 57 8, center<br />
scroll "", 12, 72 72 58 8, range 0 100 horizontal bottom<br />
button "&Close", 13, 93 90 37 16, ok<br />
}<br />
ON *:DIALOG:whatEvents:*:*: {<br />
did -ra $dname 2 $devent<br />
did -ra $dname 4 $did<br />
did -ra $dname 6 $iif($did == 0,NA,$iif($did($did),$v1,$iif($did($did).sel,$v1,$iif($did($did) == 0,0,NA))<br />
did -ra $dname 10 $did(9).state<br />
}</source><br />
<br />
Once saved into a script file inside of the mIRC remotes, the above example can be executed by typing the following command:<br />
<pre>/whatEvents</pre><br />
<br />
Almost all events are accounted for. The dialog properly tracks mouse movements, the ID of the elements being altered/used, and any other sorts of attainable event information.<br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.5}}<br />
<br />
== See also ==<br />
* {{mIRC|$dname}}<br />
* {{mIRC|$devent}}<br />
* {{mIRC|$didwm}}<br />
* {{mIRC|$didreg}}<br />
* {{mIRC|$didtok}}<br />
* {{mIRC|/dialog}}<br />
* {{mIRC|/did}}<br />
* {{mIRC|/didtok}}<br />
* [[On dialog - mIRC|ON DIALOG]]<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|did]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/iuser&diff=102343mirc/commands/iuser2024-02-21T19:24:13Z<p>KindOne: /* Compatibility */ This was added in 5.6</p>
<hr />
<div>{{mirc title|/iuser Command}}<br />
The '''/iuser command''' can be used to set or remove the info appended to an user list entry.<br />
<br />
== Synopsis ==<br />
/iuser <nick|address> [info]<br />
<br />
== Switches ==<br />
None<br />
<br />
== Parameters ==<br />
* '''<nick|address>''' - The exact nick or address to be used<br />
* '''[info]''' - If not provided, clear the info<br />
<br />
== Example ==<br />
<syntaxhighlight lang="mIRC">;Add an address; Info can be retrieved using $ulist(*!*@Example.com).info<br />
/auser 5 *!*@example.com Cool people<br />
<br />
;Update the info<br />
/iuser *!*@example.com Uncool!</syntaxhighlight><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.6}}<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$ulevel}}<br />
* {{mIRC|$ulist}}<br />
* {{mIRC|/flush}}<br />
* {{mIRC|/guser}}<br />
* {{mIRC|/auser}}<br />
* {{mIRC|/rlevel}}<br />
* {{mIRC|/ruser}}<br />
* {{mIRC|/ulist}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|iuser command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$email&diff=102342mirc/identifiers/$email2024-02-20T23:07:30Z<p>KindOne: /* Compatibility */ This was added in 5.1</p>
<hr />
<div>{{mirc title|$email Identifier}}'''$email''' returns the email address you have specified in the mIRC connect dialog.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$email</pre><br />
<br />
== Switches ==<br />
None<br />
<br />
== Example ==<br />
'''Echo the email address you provided to the currently active window'''<br />
<pre>//echo -a $email</pre><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.1}}<br />
<br />
== See also ==<br />
* {{mIRC|$anick}}<br />
* {{mIRC|$host}}<br />
* {{mIRC|$me}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|email]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/else&diff=102341mirc/commands/else2024-02-20T23:02:17Z<p>KindOne: Correct typo.</p>
<hr />
<div>{{mirc title|/else Command}}<br />
The '''/else command''' is a [[Conditional statements - mIRC|construct in the mIRC scripting language]] that performs the command if all the previous {{mIRC|/if}} or {{mIRC|/elseif}} failed, must be used after an {{mIRC|/if}} or {{mIRC|/elseif}} statement.<br />
<br />
The else statement is used in conjunction with the {{mIRC|/if}} statement and the {{mIRC|/elseif}} statement to jump to certain blocks of code depending on the result of the conditional statement that was executed.<br />
<br />
== Synopsis ==<br />
else <command><br />
else { <commands> }<br />
<br />
== Switches ==<br />
None<br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example ==<br />
<syntaxhighlight lang="mIRC">alias test {<br />
if ($1 == 1) echo -a 1!<br />
elseif ($1 isnum 2-7) echo -a 2-7!<br />
else echo -a 8-!<br />
}</syntaxhighlight><br />
<br />
== Compatibility ==<br />
Added: 4.5<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$halted}}<br />
* {{mIRC|$result}}<br />
* {{mIRC|$alias}}<br />
* {{mIRC|$isalias}}<br />
* {{mIRC|$iif}}<br />
* {{mIRC|/alias}}<br />
* {{mIRC|/goto}}<br />
* {{mIRC|/halt}}<br />
* {{mIRC|/return}}<br />
* {{mIRC|/while}}<br />
* {{mIRC|/returnex}}<br />
* {{mIRC|/elseif}}<br />
* {{mIRC|/else}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|else command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$false&diff=102340mirc/identifiers/$false2024-02-20T22:06:04Z<p>KindOne: /* Compatibility */ This was added in 4.5</p>
<hr />
<div>{{mirc title|$false Identifier}}'''$false''' is returned during any statement that is either written for it to return a value of '''$false''', or performing a comparison operation where the outcome is ''$false''.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$false</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example ==<br />
'''Echo to the active window a result that returns ''$false'''''<br />
<source lang="mIRC">//echo -a $isfile($mircexee)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.5}}<br />
<br />
== See also ==<br />
* {{mIRC|$cancel}}<br />
* {{mIRC|$no}}<br />
* {{mIRC|$ok}}<br />
* {{mIRC|$input}}<br />
* {{mIRC|$true}}<br />
* {{mIRC|$yes}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|false]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$true&diff=102339mirc/identifiers/$true2024-02-20T22:05:43Z<p>KindOne: /* Compatibility */ This was added in 4.5</p>
<hr />
<div>{{mirc title|$true identifier}}'''$true''' is the result of a successful comparison operation and various other identifiers.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$true</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
None<br />
<br />
== Example ==<br />
Echo to the active window a result that returns $true:<br />
<source lang="mIRC">//echo -a $isfile($mircexe)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.5}}<br />
<br />
== See Also ==<br />
* {{mIRC|$cancel}}<br />
* {{mIRC|$false}}<br />
* {{mIRC|$no}}<br />
* {{mIRC|$ok}}<br />
* {{mIRC|$input}}<br />
* {{mIRC|$yes}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|true]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/queryrn&diff=102338mirc/commands/queryrn2024-02-20T17:18:26Z<p>KindOne: Correct typos.</p>
<hr />
<div>{{mirc title|/queryrn Command}}<br />
The '''/queryrn command''' changes the nickname of an open query window.<br />
<br />
== Synopsis ==<br />
/queryrn <oldname> <newname><br />
<br />
== Switches ==<br />
None<br />
<br />
== Parameters ==<br />
* '''<oldname>''' - The old name of the query window.<br />
* '''<newname>''' - The new name of the query window.<br />
<br />
== Example ==<br />
None<br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.8}}<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|/query}}<br />
* {{mIRC|$query}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|queryrn command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/socklist&diff=102337mirc/commands/socklist2024-02-20T15:25:54Z<p>KindOne: Correct typo.</p>
<hr />
<div>{{mirc title|/socklist Command}}<br />
The '''/socklist''' command allows mIRC to list all sockets that are currently open.<br />
<br />
== Synopsis ==<br />
<source lang="mIRC">/socklist [-tul] [name]</source><br />
<br />
== Switches ==<br />
* '''-tul''' - These can be a single, or combination, of switches to list open TCP, UDP or listening sockets, respectively.<br />
<br />
== Parameters ==<br />
<br />
* '''[name]''' - The name of the socket to search for. This parameter can also be a {{mirc|wildcard}} match.<br />
<br />
== Example ==<br />
List all TCP sockets that have the begin with '''mySock''':<br />
<source lang="mIRC">/socklist -t mySock*</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.71}}<br />
<br />
== See Also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$sock}}<br />
* {{mIRC|$sockname}}<br />
* {{mIRC|$sockerr}}<br />
* {{mIRC|$sockbr}}<br />
* {{mIRC|/sockaccept}}<br />
* {{mIRC|/sockclose}}<br />
* {{mIRC|/socklisten}}<br />
* {{mIRC|/sockmark}}<br />
* {{mIRC|/sockopen}}<br />
* {{mIRC|/sockpause}}<br />
* {{mIRC|/sockread}}<br />
* {{mIRC|/sockrename}}<br />
* {{mIRC|/sockudp}}<br />
* {{mIRC|/sockwrite}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|socklist]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$snick&diff=102336mirc/identifiers/$snick2024-02-20T15:06:28Z<p>KindOne: /* Example */ $snick requires a channel name.</p>
<hr />
<div>{{mirc title|$snick Identifier}}'''$snick''' returns the Nth selected nickname on the specified channel<br />
<br />
<br />
== Synopsis ==<br />
<pre>$snick(#chan,N)</pre><br />
<br />
== Parameters ==<br />
* '''#chan''' - The channel name you want to know the selected nickname from<br />
* '''N''' - The Nth selected nickname on that channel.<br />
<br />
== Properties ==<br />
None<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $snick(#channel,0)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.5}}<br />
<br />
== See Also ==<br />
{{mIRC|$snicks}}<br />
<br />
[[Category:mIRC identifiers]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/drawrect&diff=102335mirc/commands/drawrect2024-02-20T14:42:17Z<p>KindOne: /* Compatibility */ This was added in 5.3</p>
<hr />
<div>{{mirc title|/drawrect Command}}<br />
The '''/drawrect command''' can be used to draw a rectangle in a picture window. Multiple rectangles can be drawn at once.<br />
<br />
== Synopsis ==<br />
/drawrect [-ihnrfecd] <@win> <color> <size> <x y w h> [x y w h [...]]<br />
<br />
== Switches ==<br />
* '''-i''' - draws in inverse color mode. You can find the final color based on the two color by using $xor($xor(currentcolor,16777215),drawncolor). Drawing the same color gives white and may be used to create transparency effect.<br />
* '''-h''' - Highlights the windows icon if it is minimized.<br />
* '''-n''' - Prevents the display from being updated immediately.<br />
* '''-r''' - Indicates that the color is in RGB format.<br />
* '''-f''' - Draws a filled rectangle.<br />
* '''-e''' - Draws an ellipse instead of a rectangle.<br />
* '''-c''' - Draws a focus rectangle.<br />
* '''-d''' - Draws a rounded rectangle, using the format "/drawrect -d x y w h [w h]" where w and h are the width and height of the ellipse used to draw the corners.<br />
<br />
== Parameters ==<br />
* '''<@win>''' - Name of the Picture Window to draw to.<br />
* '''<color>''' - A mIRC colour value from 0 to 15, or if the -r switch is used, an RGB value.<br />
* '''<size>''' - Thickness of the border in pixels.<br />
* '''<x y w h>''' - Co-ordinates for a rectangle in pixels, x and y are the top left corner.<br />
<br />
== Example ==<br />
<syntaxhighlight lang="mIRC">;Draws a rectangle that is blue (colour 2) with border thickness of 7, at co-ordinates 15,10 with a width of 200 and height of 150.<br />
/drawrect @window 2 7 15 10 200 150<br />
<br />
;Same as above but the corners are drawn using a 5x5 ellipse.<br />
/drawrect -d @window 2 7 15 10 200 150 5 5<br />
<br />
;Draws a filled green rectangle using an RGB colour value.<br />
/drawrect -fr @window 65280 1 5 5 20 20<br />
</syntaxhighlight><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.3}}<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$rgb}}<br />
* {{mIRC|$window}}<br />
* {{mIRC|/drawcopy}}<br />
* {{mIRC|/drawdot}}<br />
* {{mIRC|/drawfill}}<br />
* {{mIRC|/drawline}}<br />
* {{mIRC|/drawpic}}<br />
* {{mIRC|/drawreplace}}<br />
* {{mIRC|/drawrot}}<br />
* {{mIRC|/drawsave}}<br />
* {{mIRC|/drawscroll}}<br />
* {{mIRC|/drawtext}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|drawrect command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$banmask&diff=102334mirc/identifiers/$banmask2024-02-20T07:03:42Z<p>KindOne: /* Compatibility */ This was added in 4.5</p>
<hr />
<div>{{mirc title|$banmask Identifier}}'''$banmask''' returns the current user ban through either an {{mIRC|on events/on ban|ON BAN Event}}, or an {{mIRC|on events/on ban|ON UNBAN Event}}. Most of the time, a banmask returns a {{mirc|wildcard}} address, generally resembling ''*user*@host.net''.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$banmask</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example ==<br />
'''Message any channel where a ban has occurred, acknowledging the address the ban was placed on'''<br />
<source lang="mIRC">ON *:BAN:#: {<br />
msg # Uh, oh! Looks like the address $banmask has just been banned.<br />
}</source><br />
<br />
'''Message any channel where an unban has occurred, and report the address that was removed'''<br />
<source lang="mIRC">ON *:UNBAN:#: {<br />
msg # Oh, look! $banmask was just removed from the channel banlist.<br />
}</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.5}}<br />
<br />
== See Also ==<br />
* {{mIRC|$bnick}}<br />
* {{mIRC|$ibl}}<br />
* {{mIRC|/ban}}<br />
* {{mIRC|on events/on ban|on ban event}}<br />
* {{mIRC|on events/on unban|on unban event}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|banmask]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/dialog_components&diff=102333mirc/dialog components2024-02-19T18:09:37Z<p>KindOne: /* /did */ Correct typo.</p>
<hr />
<div>__NOTOC__{{mirc title|Dialog Components}}<br />
'''Dialog Components''' are individual [[Dialogs - mIRC|dialog]] elements that can be added onto the main dialog window. Below is a list of all the natively provided dialog components in [[mIRC]].<br />
<br />
== Components ==<br />
{| class="wikitable"<br />
{| border="0" cellpadding="0" cellspacing="25px" style="background: rgba(0,0,0,.01); border-radius: 6px; box-shadow: 0 0 7px rgba(0,0,0,.17); margin: 0 auto;"<br />
|- style="color: rgba(0,0,0,.65);"<br />
! Button !! Check !! Toggle !! Text<br />
|-<br />
| [[File:MIRCdlgButton_n.png|link=#Button|center|135px]]<br />
|| [[File:MIRCdlgCheck_n.png|link=#Check|center|135px]]<br />
|| [[File:MIRCdlgToggle_n.png|link=#Check|center|135px]]<br />
|| [[File:MIRCdlgLabel_n.png|link=#Text|center|135px]]<br />
|- style="color: rgba(0,0,0,.65);"<br />
! Group Box !! Icon !! Edit !! Scroll<br />
|-<br />
| [[File:MIRCdlgGroup_n.png|link=#Group_Box|center|135px]]<br />
|| [[File:MIRCdlgImage_n.png|link=#Icon|center|135px]]<br />
|| [[File:MIRCdlgText_n.png|link=#Edit|center|135px]]<br />
|| [[File:MIRCdlgScroll_n.png|link=#Scroll|center|135px]]<br />
|- style="color: rgba(0,0,0,.65);"<br />
! Link !! Menu !! Radio !! Tab<br />
|-<br />
| [[File:MIRCdlgLink_n1.png|link=#Link|center|135px]]<br />
|| [[File:MIRCdlgMenu_n.png|link=#Menu|135px]]<br />
|| [[File:MIRCdlgRadio_n.png|link=#Radio|135px]]<br />
|| [[File:MIRCdlgTab_n.png|link=#Tab|135px]]<br />
|- style="color: rgba(0,0,0,.65);"<br />
! List !! Combo<br />
|-<br />
| [[File:MIRCdlgList_n.png|link=#List|center|135px]]<br />
|| [[File:MIRCdlgCombo_n.png|link=#Combo|center|135px]]<br />
|}<br />
<br />
<br />
== Button ==<br />
The button control is a user interface control that responds to click events.<br />
<br />
=== Synopsis ===<br />
<pre>button "<text>", <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| default || Sets the button to be the default button. This causes the button to be selected upon dialog creation.<br />
|-<br />
| ok || Sets the button to be the OK button. The OK button closes the dialog and in modal mode returns the return value set.<br />
|-<br />
| cancel || Closes the dialog as if it was canceled – similar to clicking the X button.<br />
|-<br />
| flat || Creates a flat button (that depends on the OS and the theme used).<br />
|-<br />
| multi || Allows the text in the button to wrap around to multiple lines.<br />
|-<br />
| disable|| Disables the button.<br />
|-<br />
| hide || Makes the button invisible.<br />
|-<br />
| result|| In modal mode, returns the text of the button.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the button<br />
* -t - sets the button as the default button<br />
* -e - enables the button<br />
* -b - disables the button<br />
* -v - makes the button visible<br />
* -h - hides the button<br />
* -r - clears the button's text (caption)<br />
* -a - Adds to the button's text (caption)<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, return the text (caption) of the button, same as the .text property<br />
<br />
Properties:<br />
* .text - returns the text of the button (caption)<br />
* .len - returns the length of the button's text (caption)<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the button is visible, otherwise $false<br />
* .enabled - returns $true if the button is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| sclick || Triggers upon single click<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 50<br />
option dbu<br />
button "Example 1", 1, 4 10 40 12<br />
button "Example 2", 2, 50 10 40 12<br />
button "Example A", 3, 4 30 40 12<br />
button "Example B", 4, 50 30 40 12, ok<br />
}<br />
; event<br />
on *:dialog:example:sclick:1-4:{<br />
echo -a $did($dname, $did).text is clicked.<br />
}</source><br />
<br />
<div style="display: block; text-align: center;">[[File:MIRCdlgButton Example.png]]</div><br />
<br />
== Check ==<br />
The checkbox control is a user interface element that permits the user to select or deselect an option. The checkbox control is a combination of a check box and a label. The mIRC check control has three states: Checked, Unchecked, and Indeterminate.<br />
<br />
=== Synopsis ===<br />
<pre>check "<text>", <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| push || Toggle Button<br />
|-<br />
| left || Places the text on the left side of the control.<br />
|-<br />
| 3state || Enables Indeterminate State.<br />
|-<br />
| multi || Allows the text in the check box to wrap around to multiple lines.<br />
|-<br />
| disable || Disables the check box.<br />
|-<br />
| hide || Makes the check box invisible.<br />
|-<br />
| result || In modal mode, returns the text of the check box.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the checkbox<br />
* -t - sets the checkbox as the default control<br />
* -e - enables the checkbox<br />
* -b - disables the checkbox<br />
* -v - makes the checkbox visible<br />
* -h - hides the checkbox<br />
* -c - mark the checkbox as checked<br />
* -u - mark the checkbox as unchecked, if you use -cu, it marks a 3dstate checkbox as indeterminate.<br />
* -r - clear the text of the checkbox (caption)<br />
* -a - adds text to the text of the checkbox (caption)<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, returns the text (caption) of the checkbox, same as the .text property<br />
<br />
Properties:<br />
<br />
* .text - returns the text (caption) of the checkbox line or Nth line<br />
* .len - returns the length of the text of the checkbox (caption)<br />
* .state - returns the state of the checkboxes, 0 = unchecked, 1 = checked, 2 = indeterminate (for 3stage checkboxes)<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the checkbox is visible, otherwise $false<br />
* .enabled - returns $true if the checkbox is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| sclick || Triggers upon single click<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 50<br />
option dbu<br />
check "Example 1", 1, 4 10 40 12, 3state<br />
check "Example 2", 2, 50 10 40 12<br />
check "Example 3", 3, 4 30 40 12<br />
button "Done", 4, 50 30 40 12, ok<br />
}<br />
; events<br />
on *:dialog:example:init:0:{ <br />
did -cu $dname 1<br />
did -c $dname 2<br />
}<br />
on *:dialog:example:sclick:1-3:{<br />
echo -a $did($dname, $did).text is clicked. $&<br />
State: $dstate $+ .<br />
}<br />
alias -l dstate {<br />
var %s UnChecked Checked Indeterminate<br />
return $gettok(%s, $calc($did($dname, $did).state + 1), 32)<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgCheck Example.png]]</div><br />
<br />
<br />
== Text ==<br />
A text is simply a [[GUI]] label component with text designed for displaying information with no user input. By default, the text will wrap to the next line if needed.<br />
<br />
=== Synopsis ===<br />
<pre>text "<text>", <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| nowrap || Prevents the text from wrapping. Any text that does not fit will simply be cut off.<br />
|-<br />
| center || Centers the text in the label.<br />
|-<br />
| right || Right-aligned the text in the label.<br />
|-<br />
| disable || Disables the label. (grays it out)<br />
|-<br />
| hide|| Makes the label invisible.<br />
|-<br />
| result|| In modal mode, returns the text of the label.<br />
|}<br />
<br />
==== /did ====<br />
* '''-f''' - sets focus on the text control<br />
* '''-e''' - enable the text control<br />
* '''-b''' - disable the text control<br />
* '''-v''' - make the text control visible<br />
* '''-h''' - hide the text control<br />
* '''-r''' - clears the text of the text control<br />
* '''-a''' - adds text to the text control<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, return the text (caption) of the text control, same as the .text property<br />
<br />
Properties:<br />
* .text - returns the text of the text control (caption)<br />
* .len - returns the length of the text of the text control (caption)<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the text control is visible, otherwise $false<br />
* .enabled - returns $true if the text control is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| sclick || Triggers upon single click<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 70<br />
option dbu<br />
text "This label does not wrap.", 1, 4 10 40 15, nowrap<br />
text "This is a simple label.", 2, 4 30 40 15<br />
text "I am right-aligned.", 3, 4 50 40 15, right<br />
button "Done", 4, 50 30 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgLabel Example.png]]</div><br />
<br />
<br />
== Group Box ==<br />
This is a static control with a group box frame and an optional title that shows up at the top of the frame.<br />
<br />
'''Note:''' This only displays the group box but does not actually group the controls that you position within it. <br />
If you want to e.g. enable / disable them together, you need to do that programmatically.<br />
<br />
=== Synopsis ===<br />
<pre>box "<title>", <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disable || Disables the group box.<br />
|-<br />
| hide || Makes the group box invisible.<br />
|-<br />
| result || In modal mode, returns the text of the button.<br />
|-<br />
| left || Put the title on the left<br />
|-<br />
| center || Put the title in the center<br />
|-<br />
| right || Put the title on the right<br />
|-<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - set focus on the box<br />
* -e - enable the box<br />
* -b - disable the box<br />
* -v - make the box visible<br />
* -h - hide the box<br />
* -r - clear the box's text (caption)<br />
* -a - Adds to the box's text (caption)<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, return the text (caption) of the box, same as the .text property<br />
<br />
Properties:<br />
* .text - returns the text of the box (caption)<br />
* .len - returns the length of the box's text (caption)<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the box is visible, otherwise $false<br />
* .enabled - returns $true if the box is enabled, otherwise $false<br />
<br />
=== Events ===<br />
This control has no events.<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 90 120<br />
option dbu<br />
box "A Settings", 1, 4 4 80 40<br />
box "B Settings", 2, 4 50 80 40<br />
button "Done", 4, 40 100 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgGroup Example.png]]</div><br />
<br />
<br />
== Icon ==<br />
An icon control is a simple container that holds images and icons.<br />
<br />
'''Note''': You cannot make an empty icon control, you must give a filename.<br />
<br />
=== Synopsis ===<br />
<pre>icon <id>, <x> <y> <width> <height>[, <filename>[, <index>]], <style></pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disabled || Prevents the image from being shown. Frame might still show on some themes.<br />
|-<br />
| hide || Hides the image.<br />
|-<br />
| noborder || Hide the border around the image.<br />
|-<br />
| top || Aligns the image with the top of the container. Only applies if the image size is smaller than the container.<br />
|-<br />
| left || Aligns the image with the left of the container. Only applies if the image size is smaller than the container.<br />
|-<br />
| bottom || Aligns the image with the bottom of the container. Only applies if the image size is smaller than the container.<br />
|-<br />
| right || Aligns the image with the right of the container. Only applies if the image size is smaller than the container.<br />
|-<br />
| small || Use small factor image size.<br />
|-<br />
| large || Use large factor image size.<br />
|-<br />
| actual || Use actual factor image size.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the icon<br />
* -e - enables the button<br />
* -b - disables the button<br />
* -v - makes the button visible<br />
* -h - hides the button<br />
* -g - sets a new icon/bmp to an icon control, /did -g <name> <id> [n] <filename> where [n] is the optional index for the icon in the file<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)<.property><br />
<br />
Properties:<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the icon is visible, otherwise $false<br />
* .enabled - returns $true if the icon is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| mouse || Triggers when a mouse moves over the image.<br />
|-<br />
| sclick || Triggers upon a left mouse click on the image.<br />
|-<br />
| uclick || Triggers upon a release of the left mouse click.<br />
|-<br />
| dclick || Triggers upon a double left mouse click.<br />
|-<br />
| rclick || Triggers upon a right mouse click on the image.<br />
|-<br />
| drop || Triggers upon a drop click on the image.<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 110<br />
option dbu<br />
<br />
icon 1, 10 10 80 80, "C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg", actual<br />
<br />
button "Done", 7, 10 95 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgImage Example.png]]</div><br />
<br />
== Edit ==<br />
The edit control can behave as a normal text box as well as a rich text control.<br />
<br />
=== Synopsis ===<br />
<pre>edit "<text>", <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disabled || Disables the text control.<br />
|-<br />
| read || Sets the control to read-only.<br />
|-<br />
| pass || Treats the textbox as a password field. Stars-out the text.<br />
|-<br />
| hide || Hides the text control.<br />
|-<br />
| right || Right aligns the text.<br />
|-<br />
| center || Center aligns the text.<br />
|-<br />
| multi || Allows the text to span multiple lines.<br />
|-<br />
| hsbar || Always show the horizontal scrollbar.<br />
|-<br />
| autohs || Show the horizontal scrollbar automatically when needed.<br />
|-<br />
| vsbar || Allows show the vertical scrollbar.<br />
|-<br />
| autovs || Show the vertical scrollbar automatically when needed.<br />
|-<br />
| rich || Creates a rich-edit control instead of the normal text control.<br />
|-<br />
| return || Accepts the return key. Allowing the user to create a new line.<br />
|-<br />
| limit N || Limits the text to N characters.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - set focus on the editbox<br />
* -e - enable the editbox<br />
* -b - disable the editbox<br />
* -v - make the editbox visible<br />
* -h - hide the editbox<br />
* -r - clear the edit's text<br />
* -a - Adds to the editbox's text. You can use $crlf if the editbox has 'multi' style to add a newline.<br />
* -n - enables the editbox<br />
* -m - disables editbox<br />
* -c - sets the selected text in the editbox, /did -c <name> <id> <line> [[n [n2]], set the selection on line <line>, where n and n2 represent the start/end position of the selection in the line<br />
* -d - if you used the 'multi' style, deletes the Nth line in the editbox<br />
* -i - inserts the text on the Nth line of the editbox (if you are not using the 'multi' style, it overwrites everything)<br />
* -o - overwrite the Nth line (if you are not using the 'multi' style, it overwrite everything) in the editbox<br />
* -j - resets the edited setting of the editbox<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>,[N])[.property]<br />
<br />
Without any property, return the text (caption) of the editbox, same as the .text property<br />
<br />
Properties:<br />
* .text - returns the text of the editbox or the Nth line if the 'multi' style has been used (caption)<br />
* .len - returns the length of the editbox's text (caption)<br />
* .lines - returns the number of lines in the editbox<br />
* .sel - If N is non-zero, returns the line number of the starting position of selection<br />
* .seltext - returns the selected text in the editbox<br />
* .selstart - returns the position of the start of the selection in the editbox<br />
* .selend - returns the position of the end of the selection in the editbox<br />
* .edited - returns $true if the content of the editbox was changed<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the button is visible, otherwise $false<br />
* .enabled - returns $true if the button is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| mouse|| Triggers when a mouse moves over the text.<br />
|-<br />
| edit|| Triggers when the text has changed/edited.<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 110<br />
option dbu<br />
<br />
edit "Left", 1, 10 10 80 20,<br />
edit "Center", 2, 10 40 80 20, center<br />
edit "Right", 3, 10 70 80 20, right<br />
<br />
button "Done", 7, 10 95 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgText Example.png]]</div><br />
<br />
<br />
== Scroll ==<br />
A scrollbar is a simple dialog component that can be used to scroll something. A scrollbar operates within a given range.<br />
<br />
=== Synopsis ===<br />
<pre>scroll "<text>", <id>, <x> <y> <width> <height>, <style></pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| left || Positions the scrollbar at the left side of the rectangular area specified.<br />
|-<br />
| right || Positions the scrollbar at the right side of the rectangular area specified.<br />
|-<br />
| top || Positions the scrollbar at the top side of the rectangular area specified.<br />
|-<br />
| bottom || Positions the scrollbar at the bottom side of the rectangular area specified.<br />
|-<br />
| horizontal || Creates a horizontal scrollbar instead of a vertical one.<br />
|-<br />
| range || Sets the range of the scrollbar, Syntax: range <low> <high>.<br />
|}<br />
<br />
==== /did ====<br />
* '''-f''' - sets focus on the scrollbar<br />
* '''-e''' - enables the scrollbar<br />
* '''-b''' - disables the scrollbar<br />
* '''-v''' - makes the scrollbar visible<br />
* '''-h''' - hides the scrollbar<br />
* '''-z''' - Sets the range of the scrollbar, /did -z <name> <id> [n [n2]]<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)<.property><br />
<br />
Properties:<br />
* .sel - returns the value of the current position of the scrollbar<br />
* .lines - returns the current maximum value used for the range<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the button is visible, otherwise $false<br />
* .enabled - returns $true if the button is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| scroll || Triggers upon a scrollbar value change only.<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 90 65<br />
option dbu<br />
<br />
text "0%", 1, 30 20 20 20<br />
scroll , 2, 60 5 5 40, range 0 100<br />
<br />
button "Done", 13, 25 50 40 12, ok<br />
}<br />
on *:dialog:example:scroll:2:{<br />
did -ra example 1 $did(example, 2).sel $+ %<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgScroll Example.png]]</div><br />
<br />
<br />
== Link ==<br />
A link control, just like a label, is a static control with the additional behavior that, when you put your mouse over the control, the cursor because a little hand, indicating you can interact with that link, usually to open an URL.<br />
<br />
To make the link actually open the web page, you need to code an ON DIALOG SCLICK event. <br />
<br />
=== Synopsis ===<br />
<pre>link "text", <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disable || Disables the link. (grays it out)<br />
|-<br />
| hide || Makes the link invisible.<br />
|-<br />
| result || In modal mode, returns the URL.<br />
|}<br />
<br />
==== /did ====<br />
* '''-f''' - sets focus on the link control<br />
* '''-e''' - enables the link<br />
* '''-b''' - disables the link<br />
* '''-v''' - makes the link visible<br />
* '''-h''' - hides the link<br />
* '''-a''' - Adds text to the link's text (caption)<br />
* '''-r''' - Deletes the text (caption) of the link<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, return the text (caption) of the link, same as the .text property<br />
<br />
Properties:<br />
* .text - returns the text (caption) of the link control<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the button is visible, otherwise $false<br />
* .enabled - returns $true if the button is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| sclick || Triggers upon single click<br />
|-<br />
| dclick || Triggers upon double click<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 50<br />
option dbu<br />
link "http://www.wikichip.org/", 1, 4 10 80 12<br />
button "Done", 4, 50 30 40 12, ok<br />
}<br />
; click event<br />
on *:dialog:example:sclick:1: url -a $did(example,$did)</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgLink Example.png]]</div><br />
<br />
== Menu ==<br />
A menu control that allows a hierarchical organization of elements called menu items.<br />
<br />
=== Synopsis ===<br />
<pre>menu "<text>", <menuid> [, <menuid>]<br />
item "<text>", <id [, <menuid>]<br />
item break, <id [, <menuid>]</pre><br />
<br />
'''Note:''' Menu items can nest under other menus by simply specifying their parent menu ID.<br />
<br />
=== Styles ===<br />
This element has no available styles.<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| menu || Triggers upon menu click<br />
|}<br />
<br />
==== /did ====<br />
* '''-e''' - enables the menu/item<br />
* '''-b''' - disables the menu/item<br />
* '''-v''' - makes the menu/item visible<br />
* '''-h''' - hides the menu/item<br />
* '''-a''' - Adds an item to a menu, /did -a <name> <menuid> <newid> <text><br />
* '''-i''' - Inserts an item to a menu before the item identified by the specified <id>, /did -i <name> <id> <newid> <text><br />
* '''-d''' - Deletes the item from the menu, /did -d <name> <id><br />
<br />
==== $did ====<br />
<br />
No $did support for a menu or an item.<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 110<br />
option dbu<br />
<br />
menu "&File", 1<br />
item "&New", 11, 1<br />
item "&Open...", 12, 1<br />
item "&Save", 13, 1<br />
item "Save &As...", 14, 1<br />
menu "&Edit", 2<br />
item "Some Item1", 21, 2<br />
item break, 22, 2<br />
item "Some Item2", 23, 2<br />
menu "&View", 3<br />
item "Some Item3", 31, 3<br />
item break, 32, 3<br />
item "Some Item4", 33, 3<br />
menu "&Help", 4<br />
item "Some Item5", 41, 4<br />
item break, 42, 4<br />
item "Some Item6", 43, 4<br />
<br />
button "Done", 7, 10 95 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgMenu Example.png]]</div><br />
<br />
<br />
== Radio ==<br />
Radio buttons are a group of controls that can be configured to only allow the user to choose one of a predefined set of options.<br />
<br />
=== Synopsis ===<br />
<pre>radio "<text>", <id>, <x> <y> <width> <height>[, <style> [group]]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| left || Places the text on the left side of the control.<br />
|-<br />
| push || Creates a radio button in the form of normal buttons.<br />
|-<br />
| disable || Disables the button.<br />
|-<br />
| hide || Makes the button invisible.<br />
|-<br />
| result || In modal mode, returns the text of the button.<br />
|-<br />
| group || Identifies the first radio button in a group of severals radio buttons, only one can be checked at a time.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the radio<br />
* -t - sets the radio as the default control<br />
* -e - enables the radio<br />
* -b - disables the radio<br />
* -v - makes the radio visible<br />
* -h - hides the radio<br />
* -c - mark the radio as checked<br />
* -u - mark the checkboradio as unchecked<br />
* -r - clear the text of the radio (caption)<br />
* -a - adds text to the text of the radio (caption)<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, returns the text (caption) of the radio, same as the .text property<br />
<br />
Properties:<br />
<br />
* .text - returns the text (caption) of the radio line or Nth line<br />
* .len - returns the length of the text of the radio (caption)<br />
* .state - returns the state of the radio, 0 = unchecked, 1 = checked<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the radio is visible, otherwise $false<br />
* .enabled - returns $true if the radio is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| sclick || Triggers upon single click<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 90 80<br />
option dbu<br />
<br />
; 1st group<br />
text "Sex:", 1, 4 4 10 10<br />
radio "Male", 2, 4 13 20 10, group<br />
radio "Female", 3, 30 13 30 10<br />
<br />
; 2nd group<br />
text "Marital Status:", 4, 4 25 50 10<br />
radio "Single", 5, 4 33 22 10, group left<br />
radio "Married", 6, 30 33 25 10, left<br />
radio "Other", 7, 60 33 22 10, left<br />
<br />
; 3rd group<br />
text "Favorite Color:", 8, 4 45 50 10<br />
radio "Red", 9, 4 55 20 10, group push<br />
radio "Green", 10, 25 55 20 10, push<br />
radio "Blue", 11, 46 55 20 10, push<br />
radio "Other", 12, 67 55 20 10, push<br />
button "Done", 13, 40 68 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgRadio Example.png]]</div><br />
<br />
<br />
== Tab ==<br />
A tab control is a container component capable of holding all of the other components. A tab control can have multiple tabs, and each tab can store another set of controls.<br />
<br />
'''Note''': You cannot have more than one tab control per dialog with mIRC<br />
<br />
=== Synopsis ===<br />
<pre>tab "<text>", <id>, <x> <y> <width> <height>, <style><br />
tab "<text>", <id>, <style></pre><br />
<br />
The first tab definition in the synopsis specifies the main tab control and its size, the other definition adds an item to the tab<br />
<br />
To add a control to a tab item, specify the "tab <id>" style for the control, where <id> is the id of that tab item<br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disable || Disables all the controls inside the specified tab.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the tab<br />
* -e - enables the tab<br />
* -b - disables the tab<br />
* -v - makes the tab visible<br />
* -h - hides the tab<br />
* -r - clears the text of the tab item (caption)<br />
* -a - adds to the text of the tab item (caption)<br />
<br />
==== $did ====<br />
<br />
$did(<name>,<id>)[.property]<br />
<br />
Without any property, returns the text (caption) of the radio, same as the .text property<br />
<br />
Properties:<br />
<br />
* .text - returns the text (caption) of the tab item<br />
* .len - returns the length of the text of the tab item (caption)<br />
* .next - returns the id of the next control in order of tab keypress<br />
* .prev - returns the id of the previous control in order of tab keypress<br />
* .visible - returns $true if the tab is visible, otherwise $false<br />
* .enabled - returns $true if the tab is enabled, otherwise $false<br />
<br />
==== $dialog ====<br />
<br />
You can use $dialog(<name>).tab to know which tab is currently selected, returns the Nth tab number<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| sclick || Triggers upon single click<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 110<br />
option dbu<br />
<br />
tab "Tab 1", 1, 10 10 80 80<br />
tab "Tab 2", 2<br />
tab "Tab 3", 3<br />
<br />
button "111", 4, 20 30 40 40, tab 1<br />
button "222", 5, 20 30 40 40, tab 2<br />
button "333", 6, 20 30 40 40, tab 3<br />
<br />
button "Done", 7, 10 95 40 12, ok<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgTab Example.png]]</div><br />
<br />
== List ==<br />
The list control provides a way to display a list of items.<br />
<br />
=== Synopsis ===<br />
<pre>list <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disable || Disables the list control.<br />
|-<br />
| hide || Hides the list control.<br />
|-<br />
| sort || Sorts the items in the list.<br />
|-<br />
| multsel || Allows multiple items to be selected without holding the click/shift/control.<br />
|-<br />
| extsel || Allows extra selection support, you can use the control/shift keys to keep the selection and click on different entry in the list.<br />
|-<br />
| vsbar || Always show the vertical scrollbar.<br />
|-<br />
| hsbar || Alwas show the horizontal scrollbar.<br />
|-<br />
| check || Turns the list into a list of checkbox items.<br />
|-<br />
| radio || Turns the list into a list of radio items.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the list<br />
* -e - enables the list<br />
* -b - disables the list<br />
* -v - makes the list visible<br />
* -h - hides the list<br />
* -c - selects the Nth line in the list: /did -c <name> <id> <line><br />
* -u - unselects the Nth line in the list<br />
* -k - keeps the selection of others lines when selecting/unselecting<br />
* -s - if you used the 'check' or 'radio' style, mark the check/radio of the Nth line as checked<br />
* -l - if you used the 'check' or 'radio' style, mark the check/radio of the Nth line as unchecked<br />
* -r - clears the list<br />
* -a - adds a line to the end of the list<br />
* -d - deletes the Nth line in the list<br />
* -i - inserts a line at Nth line position in the list<br />
* -o - overwrites the Nth line with the next text in the list<br />
* -z - resets the width of the horizontal scrollbar in the list<br />
<br />
==== $did ==== <br />
<br />
$did(<name>,<id>,[N])[.property]<br />
<br />
Without any properties, returns the text of the Nth line in the list, same as the .text property.<br />
<br />
* .text - returns the Nth line in the list<br />
* .len - returns the length of the Nth line in the list<br />
* .lines - returns the number of lines in the list<br />
* .sel - returns the line number of the Nth line selected line in the list, if N = 0, returns the total number of selected line<br />
* .seltext - returns the first selected line in the list<br />
* .next - returns the id of the next control in tab key order<br />
* .prev - returns the id of the previous control in tab key order<br />
* .visible - returns $true if the list is visible, otherwise $false<br />
* .enabled - returns $true if the list is enabled, otherwise $false<br />
* .csel - if the 'radio' or 'check' style is used, returns the line number of the Nth checked line in the list, if N = 0, returns the total number of checked line<br />
* .cstate - if the 'radio' or 'check' style is used, returns the state of the check/radio control of the Nth line in the list 1 = checked, 0 = unchecked<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| mouse || Triggers when a mouse moves the list control.<br />
|-<br />
| sclick || Triggers when an item is clicked.<br />
|-<br />
| dclick || Triggers when an item is double clicked.<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 110<br />
option dbu<br />
<br />
list 1, 10 10 80 20, multsel<br />
list 2, 10 40 80 20, radio<br />
list 3, 10 70 80 20, check<br />
<br />
button "Done", 7, 10 95 40 12, ok<br />
}<br />
on 1:dialog:example:init:*: {<br />
did -a example 1 Item A<br />
did -a example 1 Item B<br />
did -a example 1 Item C<br />
did -a example 2 Item A<br />
did -a example 2 Item B<br />
did -a example 2 Item C<br />
did -a example 3 Item A<br />
did -a example 3 Item B<br />
did -a example 3 Item C<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgList Example.png]]</div><br />
<br />
<br />
== Combo ==<br />
The combo control provides a way to choose an item from a selection of items in either a list, or from a drop-down fashion selection box.<br />
<br />
=== Synopsis ===<br />
<pre>combo <id>, <x> <y> <width> <height>[, <style>]</pre><br />
<br />
=== Styles ===<br />
{| class="wikitable"<br />
|-<br />
! Style !! Description<br />
|-<br />
| disable || Disables the combo control.<br />
|-<br />
| hide || Hides the combo control.<br />
|-<br />
| sort || Sorts the items in the combo control.<br />
|-<br />
| drop || Creates a drop-down combo control.<br />
|-<br />
| edit || Used with 'drop' style, creates a drop-down editable combo control.<br />
|-<br />
| vsbar || Always show the vertical scrollbar.<br />
|-<br />
| hsbar || Always show the horizontal scrollbar.<br />
|}<br />
<br />
==== /did ====<br />
<br />
* -f - sets focus on the combo<br />
* -e - enables the combo<br />
* -b - disables the combo<br />
* -v - makes the combo visible<br />
* -h - hides the combo<br />
* -c - selects the Nth line in the combo: /did -c <name> <id> <line><br />
* -r - clears the combo, use N = 0 to clear the text of the editable editbox of the combo<br />
* -a - adds a line to the end of the combo, use N = 0 to add to the editable editbox of the combo<br />
* -d - deletes the Nth line in the combo<br />
* -i - inserts a line at Nth line position in the combo<br />
* -o - overwrites the Nth line with the next text in the combo<br />
<br />
==== $did ==== <br />
<br />
$did(<name>,<id>,[N])[.property]<br />
<br />
Without any properties, returns the text of the Nth line in the list, same as the .text property.<br />
<br />
* .text - returns the Nth line in the combo, use N = 0 to access the text of the editable editbox of the combo<br />
* .len - returns the length of the Nth line in the combo<br />
* .lines - returns the number of lines in the combo<br />
* .sel - returns the line number selected line in the combo<br />
* .seltext - returns the first selected line in the combo<br />
* .next - returns the id of the next control in tab key order<br />
* .prev - returns the id of the previous control in tab key order<br />
* .visible - returns $true if the list is visible, otherwise $false<br />
* .enabled - returns $true if the list is enabled, otherwise $false<br />
<br />
=== Events ===<br />
{| class="wikitable"<br />
|-<br />
! Event !! Description<br />
|-<br />
| mouse || Triggers when a mouse moves the combo control.<br />
|-<br />
| sclick || Triggers when an item is clicked.<br />
|}<br />
<br />
=== Example ===<br />
<source lang="mIRC">; init alias<br />
alias example {<br />
dialog -m example example<br />
}<br />
; dialog structure<br />
dialog Example {<br />
title "Example"<br />
size -1 -1 100 110<br />
option dbu<br />
<br />
combo 1, 10 10 80 50, drop<br />
combo 2, 10 50 80 50<br />
<br />
button "Done", 7, 10 95 40 12, ok<br />
}<br />
on 1:dialog:example:init:*: {<br />
did -a example 1 Item A<br />
did -a example 1 Item B<br />
did -a example 1 Item C<br />
did -a example 2 Item A<br />
did -a example 2 Item B<br />
did -a example 2 Item C<br />
}</source><br />
<div style="display: block; text-align: center;">[[File:MIRCdlgCombo Example.png]]</div><br />
<br />
<br />
[[Category:mIRC|dialog components]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_socklisten&diff=102331mirc/on events/on socklisten2024-02-18T14:39:06Z<p>KindOne: /* Compatibility */ This was added in 5.3</p>
<hr />
<div>{{mirc title|On Socklisten - Events}}<br />
The '''ON SOCKLISTEN''' event triggers when a connection is made on a listening {{mIRC|sockets#mIRC sockets|TCP socket}} created with {{mIRC|/socklisten}}<br />
<br />
== Synopsis ==<br />
<pre>ON <level>:SOCKLISTEN:<matchtext>:<commands></pre><br />
<br />
== Parameters ==<br />
<span style="display: inline-block; width: 105px;"> '''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger.<br />
<br />
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The name of the socket you want event to trigger on.<br />
<br />
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.<br />
<br />
== Accepting a connection ==<br />
<br />
'''Note''': By design, you cannot prevent a socket from being accepted, as in, Windows accepts the connection even before mIRC.<br />
<br />
You can use /sockaccept <newsocket> to accept a socket, mIRC create the new socket.<br />
<br />
'''Note''': If a new connection occurs on a listening socket but there is no on socklisten event matching that socket, the connection is rejected.<br />
<br />
You should be checking for $sockerr before accepting the connection to see if an error occured, here is a list of the possible value for $sockerr in the on SOCKLISTEN event:<br />
<br />
* '''0''' - New socket successfuly accepted.<br />
* '''1''' - Error occurred on listening socket, $sock().wsmsg will contain a more specific error message. Note that getting this error is considered rare.<br />
* '''2''' - Error accepting new socket, $sock().wsmsg will contain a more specific error message.<br />
* '''4''' - Not enough memory for new socket. Note that getting this error is considered rare.<br />
<br />
== Examples ==<br />
<br />
<source lang="mirc"><br />
on *:socklisten:name:{<br />
if (!$sockerr) sockaccept myprefix $+ $ticks<br />
else {<br />
echo -s An error occured while trying to accept a connection: $sock($sockname).wsmsg<br />
}<br />
}<br />
</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.3}}<br />
<br />
== See Also ==<br />
* {{mIRC|on events|mIRC events}}<br />
* {{mirc|on events/on sockopen|on sockopen}}<br />
* {{mirc|on events/on sockread|on sockread}}<br />
* {{mirc|on events/on sockwrite|on sockwrite}}<br />
* {{mirc|on events/on sockclose|on sockclose}}<br />
* {{mIRC|/sockwrite}}<br />
* {{mIRC|/sockclose}}<br />
* {{mIRC|/sockread}}<br />
* {{mIRC|/sockaccept}}<br />
* {{mIRC|/sockpause}}<br />
* {{mIRC|$sock}}<br />
* {{mIRC|$sockbr}}<br />
* {{mIRC|$sockerr}}<br />
<br />
[[Category:mIRC on events|socklisten]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/dynamic-link_library&diff=102330mirc/dynamic-link library2024-02-18T08:23:03Z<p>KindOne: Correct typo.</p>
<hr />
<div>{{mirc title|Dynamic-link Library}}<br />
mIRC allows programs to make calls to various '''dynamic-link libraries''' ('''DLL'''s) designed to work with mIRC. The main reason you would want to do this is that processing information in a DLL can be far faster than doing so in a mIRC script, so for intensive data processing a DLL would be more efficient.<br />
<br />
'''Note:''' mIRC also supports calling {{mIRC|COM}} objects, for calling non-standard DLLs.<br />
<br />
= Using a Dll =<br />
<br />
== Synopsis ==<br />
<br />
/dll <filename> <procname> [data]<br />
<br />
/dll -u <filename><br />
<br />
$dll(<filename>, <procname>, [data])<br />
<br />
$dllcall(<filename>, <alias>, <procname>, [data])<br />
<br />
=== Switches ===<br />
* '''-u''' - Unloads the dll<br />
<br />
=== Parameters ===<br />
* '''<filename>''' - The filename for the dll you wish to use.<br />
* '''<procname>''' - The case-sensitive name of the function/procedure you wish to call.<br />
* '''[data]''' - The optional parameters for the function/procedure, used by the procname as input and as return =2 command or =3 return string.<br />
* '''<alias>''' - If you use {{mIRC|$dllcall}}, it calls the function asynchronously, meaning that the code won't stop processing until the dll function finishes, $dllcall won't return a value. Instead, mIRC calls the specified <alias> when the function finishes.<br />
<br />
= Creating a Dll =<br />
<br />
'''Note''': We won't deal with how to create a dll in details, the scripter here must be familiar with dll creation already.<br />
<br />
Because mIRC wasn't unicode before, the exported functions used to be the following function prototype:<br />
<br />
<source lang="c">int __stdcall funcName(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause);</source><br />
<br />
With mIRC being unicode, the new prototype is:<br />
<br />
<source lang="c">int __stdcall funcName(HWND mWnd, HWND aWnd, TCHAR *data, TCHAR *parms, BOOL show, BOOL nopause);</source><br />
<br />
* '''mWnd''' - The handle of the main mIRC window.<br />
* '''aWnd''' - The handle of the window in which the command is being issued, this might not be the currently active window if the command is being called by a remote script.<br />
* '''data''' - This is a buffer you can write to if you want mIRC to perform a command or to return a value from a {{mIRC|$dll}} call (remember that {{mIRC|$dllcall}} do not return a value by design even if you fill this buffer)<br />
* '''parms''' - For a better handling of command execution, this is a buffer which can be filled if you are filling the 'data' buffer with a command. mIRC will fill the variable $1- with this value, which you can include in the command in 'data'. The examples shows how to use it.<br />
* '''show''' - This Bool value is FALSE if a dot '.' has been used to make the command (/.dll) quiet.<br />
* '''nopause''' - This Bool value is TRUE if mIRC is in a critical routine, meaning that you must not stop the processing in mIRC (long while loop for example).<br />
<br />
<br />
If you call a non unicode dll with mIRC being unicode, mIRC must call the prototype with a char * and will convert its utf16 to utf8, and whenever this happens in mIRC, the data is chopped at $maxlenl+100 bytes.<br />
<br />
Both 'data' and 'params' are allocated with a number of bytes that is close to ($maxlenl+100)*2+N where N is 100 or a bit more, and this is true both unicode and non unicode mode. This effectively mean that you can write that many bytes into the buffer yourself in both mode.<br />
<br />
These functions must use the [[stdcall calling convention]]. (This is also the standard calling convention for all other [[Microsoft]] [[Win32 API]] functions.)<br />
<br />
=== Note on C++ Dll and stdcall ===<br />
<br />
If you are making a [[C++]] dll, you need to use the extern "C" directive on all the function that you want to export (all the function called from mIRC including the LoadDll and UnloadDll routine), which indicates the function has "[[C]]" linkage as opposed to "[[C++]]".<br />
<br />
The interesting difference is that [[C]] linkage does not use "mangling" when exporting your function, an operation which rename your functions with additional information to help the linking process.<br />
<br />
<source lang="c">extern "C" int __stdcall funcName(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause);</source><br />
<br />
However, the __stdcall standard convention implies a mangling operation which extern "C" does not override.<br />
<br />
To solve this problem, most of the linker will allow you to provide a .def file, where you can define the real name of your exported functions<br />
<br />
Creating a file for that can be annoying, on Visual Studio you can use a #pragma directive to do that on the fly, the examples illustrate this<br />
<br />
'''Note:''' If you use GCC Gnu to compile, it has something similar to __stdcall, __attribute__((stdcall)).<br />
<br />
== Return value ==<br />
<br />
The function returns an integer, this value indicates what mIRC should do:<br />
<br />
* '''0''' - Means that mIRC should /halt processing.<br />
* '''1''' - Means that mIRC should continue processing without returning the contents of the DATA buffer.<br />
* '''2''' - Means that you have filled the 'data' variable with a command which mIRC should perform, you can also fill the "parms" variable with the parameters to use, if any.<br />
* '''3''' - Means that the DLL has filled the data variable with the result that $dll() as an identifier should return.<br />
<br />
'''Note''': this only applies when using $dll or /dll.<br />
<br />
== Keeping a Dll loaded ==<br />
<br />
In the past, by default, a DLL used to be unloaded immediately after you made the /dll or $dll()/$dllcall call.<br />
<br />
You had to use the function below, called by mIRC when it loads your dll, and set mKeep to True to keep the dll loaded (mKeep defaulted to False)<br />
<br />
Things changed since it's typically more useful to keep the dll loaded, now mIRC keeps the dll loaded by default with mKeep defaulting to True, and you can set it to False to unload the dll.<br />
<br />
<source lang="C"><br />
void __stdcall LoadDll(LOADINFO*);<br />
<br />
typedef struct {<br />
DWORD mVersion;<br />
HWND mHwnd;<br />
BOOL mKeep;<br />
BOOL mUnicode;<br />
DWORD mBeta;<br />
DWORD mBytes;<br />
} LOADINFO;</source><br />
<br />
* '''mVersion''' - Contains the mIRC version number in the low and high words. i.e. version 7.55 fills this with 0x00370007<br />
* '''mHwnd''' - Contains the window handle to the main mIRC window.<br />
* '''mKeep''' - Is set to TRUE by default, indicating that mIRC will keep the DLL loaded after the call. You can set mKeep to FALSE to make mIRC unload the DLL after the call<br />
* '''mUnicode''' - If set to true, indicates that the dll is using unicode as opposed to ansi (default). This means the data passed from/to the dll is in UTF16 (see above with TCHAR type instead of CHAR). If set to false, mIRC will convert utf16 to utf8 to comply with the CHAR type prototype of the function<br />
* '''mBeta''' - contains the mIRC $beta version number, for public betas.<br />
* '''mBytes''' - as of v7.64 contains the max safe byte length that can be placed into the 'data' and 'parms' buffers. This is always the double of the line length limit even when converting to utf8 with non unicode dll.<br />
<br />
== Unloading the Dll ==<br />
<br />
mIRC will automatically unload a DLL if it is not used for ten minutes, or when mIRC exits.<br />
<br />
You can define an UnloadDll() routine in your DLL which mIRC will call when unloading a DLL to allow it to clean up:<br />
<br />
int __stdcall UnloadDll(int mTimeout);<br />
<br />
The mTimeout value can be:<br />
<br />
* '''0''' - UnloadDll() is being called due to a DLL being unloaded with /dll -u.<br />
* '''1''' - UnloadDll() is being called due to a DLL not being used for ten minutes. You can return return 0 to keep the DLL loaded, or 1 to allow it to be unloaded.<br />
* '''2''' - UnloadDll() is being called due to a DLL being unloaded when mIRC exits.<br />
<br />
= Examples =<br />
<br />
== Example 1 : Using Visual studio (C++) ==<br />
<br />
This example use a non-unicode project. We don't use a .def file but a #pragma comment to export functions.<br />
<br />
We use the LoadDll and UnloadDll routine to start/stop a communication with mIRC using SendMessage().<br />
<br />
<source lang="c"><br />
#include <cstdio><br />
#include <windows.h><br />
#define WM_MCOMMAND WM_USER + 200<br />
#define WM_MEVALUATE WM_USER + 201<br />
<br />
//__stdcall cause mangling of the form _yourfunctionname@N where N is the number of bytes for all the parameters<br />
//we use #pragma to redefine the name of the exported functions, if we don't do that, you can still call the dll using the name "_youfunctionname@24" ;)<br />
//the prototype of our function always takes 6 parameters, each taking 4 bytes 6*4=24<br />
//the prototype for LoadDll and UnloadDll takes one parameter, a structure which is 4 bytes<br />
#pragma comment(linker, "/EXPORT:usingSM=_usingSM@24")<br />
#pragma comment(linker, "/EXPORT:LoadDll=_LoadDll@4")<br />
#pragma comment(linker, "/EXPORT:UnloadDll=_UnloadDll@4")<br />
#pragma comment(linker, "/EXPORT:simple_example=_simple_example@24")<br />
#pragma comment(linker, "/EXPORT:average_example=_average_example@24")<br />
#pragma comment(linker, "/EXPORT:more_example=_more_example@24")<br />
#pragma comment(linker, "/EXPORT:from_event=_from_event@24")<br />
<br />
HANDLE file;<br />
LPSTR str;<br />
<br />
extern "C" int __stdcall simple_example(HWND mWnd, HWND aWnd, CHAR *data, char *parms, BOOL show, BOOL nopause)<br />
{<br />
//we fill data with a simple string we want to return<br />
strcpy(data,"simple string");<br />
//we return 3 indicating $dll should return the value we copied in 'data'<br />
return 3;<br />
}<br />
<br />
extern "C" int __stdcall average_example(HWND mWnd, HWND aWnd, CHAR *data, char *parms, BOOL show, BOOL nopause)<br />
{<br />
//we fill data with a command we want mirc to execute<br />
strcpy(data,"/echo -a è");<br />
//we return 2 indicating mIRC should execute the command in 'data'.<br />
return 2;<br />
}<br />
<br />
extern "C" int __stdcall more_example(HWND mWnd, HWND aWnd, CHAR *data, char *parms, BOOL show, BOOL nopause)<br />
{<br />
//we fill data with a command we want mirc to execute<br />
strcpy(data,"/echo -a $1-");<br />
strcpy(parms,"test");<br />
//we return 2 indicating mIRC should execute the command in 'data', and set $1- to parms.<br />
return 2;<br />
}<br />
<br />
extern "C" int __stdcall from_event(HWND mWnd, HWND aWnd, CHAR *data, char *parms, BOOL show, BOOL nopause)<br />
{<br />
<br />
strcpy(str,"$nick");<br />
SendMessage(mWnd, WM_MEVALUATE, MAKEWPARAM(0, atoi(data)), 0);<br />
strcpy(data,str);<br />
return 3;<br />
}<br />
<br />
extern "C" int __stdcall usingSM(HWND mWnd, HWND aWnd, CHAR *data, char *parms, BOOL show, BOOL nopause)<br />
{<br />
//send //echo -s Hello world to mIRC<br />
strcpy(str,"//echo -a Hello world");<br />
SendMessage(mWnd, WM_MCOMMAND, 1 , 0);<br />
//Ask mIRC to evaluate and send back the result<br />
strcpy(str,"m $+ $upper(irc)");<br />
SendMessage(mWnd, WM_MEVALUATE, 0, 0);<br />
//Copy the result of "m $+ $upper(irc)" into data and we return 3 indicating $dll returns what 'data' contains<br />
strcpy(data,str);<br />
return 3;<br />
}<br />
<br />
typedef struct {<br />
DWORD mVersion;<br />
HWND mHwnd;<br />
BOOL mKeep;<br />
BOOL mUnicode;<br />
DWORD mBeta;<br />
DWORD mBytes;<br />
} LOADINFO;<br />
<br />
extern "C" void __stdcall LoadDll(LOADINFO *load) {<br />
file = CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE,0,4096, "mIRC");<br />
str = (LPSTR) MapViewOfFile(file, FILE_MAP_ALL_ACCESS, 0, 0, 0);<br />
//after MapViewOfFile(), 'str' is where you write to but also is the result of each call with WM_MEVALUATE:<br />
}<br />
<br />
extern "C" int __stdcall UnloadDll(int mTimeout) {<br />
//if dll is unloaded because mIRC exit or dll -u is used, we clean up, otherwise we prevent the unloading by returning 0.<br />
if (mTimeout != 1) <br />
{<br />
UnmapViewOfFile(str);<br />
CloseHandle(file);<br />
}<br />
return 0;<br />
}<br />
</source><br />
<br />
Use $dll(yourdll.dll,simple_example,) which will return "simple string".<br />
<br />
Use $dll(yourdll.dll,average_example,) or '/dll yourdll.dll average_example', this will execute "/echo -a è" in mIRC 7.x, because the project is not unicode, the two bytes è are sent as ascii, mIRC 7.x will correctly decode that as utf8. On mIRC 6.x (you would need to remove the mUnicode to mBytes variable in the LOADINFO structure), this would display the two bytes.<br />
<br />
If you set the mUnicode variable to TRUE on mIRC 7.x in the LoadDll function and if you set your project to use unicode (in visual studio: project properties > configuration properties > general > character set), this would correctly show the two bytes as well.<br />
<br />
Use $dll(yourdll.dll,more_example,) or '/dll yourdll.dll more_example' ;this will fill $1- from data with the value from parms and execute the final "//echo -a test".<br />
<br />
Use $dll(yourdll.dll,from_event,$eventid) inside an event where $nick exists, this will use SendMessage() to evaluate $nick from the event context and fill data with that value, returned by $dll.<br />
<br />
Use $dll(yourdll.dll,usingSM,) which will use SendMessage() to execute a command in mIRC, it will also evaluate a line of code and return the result in $dll().<br />
<br />
== Example 2 : Using GNU GCC on Windows (C) ==<br />
<br />
<source lang="c"><br />
//To compile, use:<br />
//gcc -c -O3 reverse.c ; gcc -shared --export-all-symbols -o reverse.dll -O3 reverse.o<br />
//reverse.c content:<br />
#include <windows.h><br />
#include <string.h><br />
<br />
int __attribute__((stdcall))<br />
reverse(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)<br />
{<br />
char *l = *data ? data + strlen(data) - 1 : data;<br />
char *p = parms;<br />
while ((*p++ = *l--));<br />
strcpy(data, "/echo -s ");<br />
strcat(data+8, parms);<br />
return 2;<br />
}<br />
</source><br />
Use /dll reverse.dll reverse <text>.<br />
<br />
[[Category:mIRC|dynamic link libraries]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$os&diff=102329mirc/identifiers/$os2024-02-18T04:13:49Z<p>KindOne: /* Properties */ Add properties.</p>
<hr />
<div>{{mirc title|$os identifier}}'''$os''' returns the name of the operating system you are running<br />
<br />
<br />
== Synopsis ==<br />
<pre>$os</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Properties ==<br />
* '''.major'''<br />
* '''.minor'''<br />
* '''.build'''<br />
* '''.platform'''<br />
* '''.type'''<br />
* '''.spmajor'''<br />
* '''.spminor'''<br />
* '''.suite'''<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $os</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.4}}<br />
<br />
== See also ==<br />
[[Category:mIRC identifiers|os]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$dns&diff=102328mirc/identifiers/$dns2024-02-17T22:37:41Z<p>KindOne: Fix dead links</p>
<hr />
<div>{{mirc title|$dns Identifier}}The '''$dns''' identifier becomes filled and has the ability for reference whenever an [[On dns - mIRC|ON DNS]] event occurs.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$dns(N)[.property]</pre><br />
<br />
== Parameters ==<br />
{{ArgsList<br />
| N | Used to reference the resolved address, or total number of addresses<br />
}}<br />
<br />
== Properties ==<br />
{{ArgsList<br />
| addr | Return the resolved [[hostmask]] address<br />
| ip | Return the [[IP Address]]<br />
| nick | Return the nicknames used when {{mIRC|/dns}}'ing on a nickname<br />
}}<br />
<br />
== Example ==<br />
Echo to the active window the results of the DNS:<br />
<source lang="mIRC">ON *:DNS:echo -a $iif($1,$iif($dns(1).nick,$v1 has been resolved to) Hostmask: $dns(1).addr IP: $dns(1).ip,Could not resolve DNS query.)</source><br />
<br />
The above example makes use of multiple {{mIRC|$iif}} to ensure that we get proper results, without unforeseen issues. The first surrounding {{mIRC|$iif}} checks to make sure any data has been returned. If no data is returned, then the [[/dns command - mIRC|DNS]] obviously failed; therefore, we have it return a statement which says that a resolution could not be made. If data has been returned, the second {{mIRC|$iif}} checks to see if a '''.nick''' value can be extracted from the [[$dns identifier - mIRC|$dns identifier]]. This is filled if a nickname was the target of the [[/dns command - mIRC|DNS]] request. If the nickname is filled, return the portion containing the nickname. If, however, the nickname is not present, present only the [[Hostmask - IRC|hostmask]] and [[IP address|IP address]].<br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.0}}<br />
<br />
== See Also ==<br />
* [[On dns - mIRC|ON DNS]]<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|dns]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/bindip&diff=102327mirc/commands/bindip2024-02-17T22:10:26Z<p>KindOne: /* Parameters */ Correct typo</p>
<hr />
<div>{{mirc title|/bindip Command}}<br />
The '''/bindip command''' sets IP binding on or off. Additionally, an IP address or an adapter name to be used can be specified. When used without parameters mIRC indicates if it's on or off.<br />
<br />
== Synopsis ==<br />
/bindip [on [Ip|Adapter] | off]<br />
<br />
== Switches ==<br />
None<br />
<br />
== Parameters ==<br />
* '''[on]''' - Sets IP binding on, if [Ip/Adapter] is given, it binds to that Ip/Adapter.<br />
* '''[off]''' - Sets the IP binding off.<br />
<br />
== Example ==<br />
<syntaxhighlight lang="mIRC">;Check if IP binding is on or off<br />
/bindip<br />
<br />
;Turn binding on, set IP<br />
/bindip on 74.123.54.13<br />
<br />
;Turn IP binding off<br />
/bindip off</syntaxhighlight><br />
<br />
The above example will output:<br />
<br />
<pre>* Binding is off<br />
<br />
* Binding is on (74.123.54.13)<br />
<br />
* Binding is off</pre><br />
<br />
== Compatibility ==<br />
Added: 6.17<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$bindip}}<br />
* {{mIRC|$ip}}<br />
* {{mIRC|/dns}}<br />
* {{mIRC|/server}}<br />
* {{mIRC|/sockaccept}}<br />
* {{mIRC|/sockopen}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|bindip command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$chan&diff=102326mirc/identifiers/$chan2024-02-17T18:59:12Z<p>KindOne: /* Properties */ Add missing "parted" response.</p>
<hr />
<div>{{mirc title|$chan Identifier}}The '''$chan''' identifier is filled during events which trigger on a channel.<br />
<br />
The '''$chan''' identifier can also be used to get information regarding a specific channel the local mIRC client is in.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$chan[(@wid/#/N).property]</pre><br />
<br />
== Parameters ==<br />
<span style="display: inline-block; width: 105px;">'''(@wid/#/N)'''</span>The window id of the channel, a specific channel, or a channel number referencing the channel.<br />
<br />
== Properties ==<br />
{| class="wikitable" style="margin-left: 75px;"<br />
|-<br />
! Property !! Description<br />
|-<br />
| '''banlist''' || Returns {{mIRC|$true}} if mode +b has been seen already, or {{mIRC|$false}} if not, or {{mIRC|$inmode}} if currently in a mode +b listing.<br />
|-<br />
| '''cid''' || Returns the connection ID for the channel.<br />
|-<br />
| '''hwnd''' || Returns the [[Operating system|operating system's]] actual [[hWnd|window handle]] for the channel.<br />
|-<br />
| '''ial''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the {{mirc|Internal address list|IAL}} has been updated for the channel.<br />
|-<br />
| '''ibl''' || Returns the same as '''banlist'''<br />
|-<br />
| '''iql''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the {{mirc|Internal quiet list|IQL}} has been updated for the channel<br />
|-<br />
| '''idle''' || Returns the amount of time the channel has been idle. This does not include entries made from the local mIRC client.<br />
|-<br />
| '''iel''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the local mIRC client is on the channel's internal exempt list.<br />
|-<br />
| '''iil''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if local mIRC client is on the channel's internal invite list.<br />
|-<br />
| '''inwho''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if a [[/who command - mIRC|/who command]] has been performed on the channel, and the results are still being processed.<br />
|-<br />
| '''key''' || Returns the channel's key.<br />
|-<br />
| '''limit''' || Returns the amount of users the channel is limited to.<br />
|-<br />
| '''logfile''' || Returns the location of the current channel's [[log file - mIRC|log file]], if any.<br />
|-<br />
| '''mode''' || Returns the current modes set in the channel.<br />
|-<br />
| '''stamp''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if [[time stamping - mIRC|time stamping]] is enabled on the channel.<br />
|-<br />
| '''status''' || Returns: '''joining''', '''joined''', '''kicked''', or '''parted'''.<br />
|-<br />
| '''topic''' || Returns the channel topic.<br />
|-<br />
| '''wid''' || Returns the mIRC application's [[window id]] for the channel window.<br />
|}<br />
<br />
== Examples ==<br />
Create an alias that opens a [[Custom windows - mIRC|custom @window]] which loads some basic information about the active channel:<br />
<source lang="mIRC">alias getDetails {<br />
if ($active ischan) {<br />
var %c = $active<br />
window @getDetails 350 350 650 200<br />
clear @getDetails<br />
echo @getDetails Channel: %c<br />
echo @getDetails $crlf $crlf<br />
echo @getDetails Topic: $chan(%c).topic<br />
echo @getDetails $crlf $crlf<br />
echo @getDetails Modes: $chan(%c).mode<br />
echo @getDetails $crlf $crlf<br />
echo @getDetails Key: $iif($chan(%c).key,$v1,No key set)<br />
}<br />
}</source><br />
<br />
This [[Aliases - mIRC|custom alias]] can now be executed using the following command in a channel command-line:<br />
<pre>/getDetails</pre><br />
<br />
The results of this command will look similar to the results below:<br />
<br />
[[File:$chan identifier example.png|Custom example for the $chan identifier - mIRC]]<br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|4.7}}<br />
<br />
== See Also ==<br />
* {{mirc|on join}}<br />
* {{mirc|on part}}<br />
* {{mIRC|$ial}}<br />
* {{mIRC|$ibl}}<br />
* {{mIRC|$nick}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|chan]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_notice&diff=102325mirc/on events/on notice2024-02-17T15:06:01Z<p>KindOne: /* Compatibility */ This was added in 3.5</p>
<hr />
<div>{{mirc title|On Notice - Events}}<br />
The '''on notice''' event is triggered when mIRC receives a notice from a client on the server.<br />
<br />
==Synopsis==<br />
<pre>on <level>:NOTICE:<matchtext>:<target>:<commands></pre><br />
<br />
==Parameters==<br />
<dl><br />
<dt style="float:left;width:105px;padding:0;margin:0 0 1em"><level></dt><br />
<dd style="padding:0;margin:0 0 1em;overflow:hidden">The [[Mirc access level|access level]] required for the event to trigger.</dd><br />
<br />
<dt style="float:left;width:105px;padding:0;margin:0 0 1em"><matchtext></dt><br />
<dd style="padding:0;margin:0 0 1em;overflow:hidden">The text that must be matched for the event to trigger.</dd><br />
<br />
<dt style="float:left;width:105px;padding:0;margin:0 0 1em"><target></dt><br />
<dd style="padding:0;margin:0 0 1em;overflow:hidden">The target(s) of the notice that the event listens on. This can either be a '''*''', or any combination of named channels, channel prefixes, '''?''', or a nickname that you are currently using - all separated by commas.</dd> <br />
<br />
<dt style="float:left;width:105px;padding:0;margin:0 0 1em"><commands></dt><br />
<dd style="padding:0;margin:0 0 1em;overflow:hidden">The commands to be performed when the event is triggered.</dd><br />
</dl><br />
<br />
==Examples==<br />
Give a person "500 points" for sending a secret command:<br />
<source lang="mirc">on *:NOTICE:thesecretcommand:?:{<br />
.notice $nick Congratulations! You have entered the secret command!<br />
.notice $nick Please accept these free 500 points...<br />
hinc -m $+(points.,$network) $wildsite 500<br />
}</source><br />
<br />
<br />
Op or deop a user with an [[Mirc access level|access level]] of 5 on the channel they specify:<br />
<source lang="mirc">on 5:NOTICE:*op #*:?:{<br />
if ($istok(op dop,$1,32)) {<br />
if ($me !ison $2) { .notice $nick I am not on that channel. }<br />
elseif ($me !isop $2) { .notice $nick I am not opped in that channel. } <br />
else mode $2 $iif($1 == op,+o,-o) $nick<br />
}<br />
}</source><br />
<br />
<br />
Automatically identify to most NickServ services if your current nickname is '''TheUsualNick''':<br />
<source lang="mirc">on *:NOTICE:This nickname is registered*:TheUsualNick:{<br />
if ($nick == NickServ) { ns identify M`/p@SsW0r|) }<br />
}</source><br />
<br />
==Compatibility==<br />
{{mIRC compatibility|3.5}}<br />
<br />
==See Also==<br />
*[[List of on events - mIRC|mIRC Events]]<br />
{{mIRC on event list}}<br />
<br />
[[Category:mIRC on events|notice]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_notify&diff=102324mirc/on events/on notify2024-02-17T15:03:21Z<p>KindOne: /* Compatibility */ This was added in 3.4</p>
<hr />
<div>{{mirc title|On Notify - Events}}<br />
The '''ON NOTIFY''' event triggers when a user in the {{mIRC|/notify}} list connects to the same server.<br />
<br />
== Synopsis ==<br />
<pre>ON <level>:NOTIFY:<commands></pre><br />
<br />
== Parameters ==<br />
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger.<br />
<br />
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.<br />
<br />
== Example ==<br />
Send a notice to the user when they connect:<br />
<source lang="mIRC">ON *:NOTIFY:notice $nick Hey there! Glad to see you again!</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|3.4}}<br />
<br />
== See Also ==<br />
* [[On unotify - mIRC|ON UNOTIFY]]<br />
{{mIRC on event list}}<br />
<br />
[[Category:mIRC on events|notify]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_deop&diff=102323mirc/on events/on deop2024-02-17T15:01:03Z<p>KindOne: /* Compatibility */ This was added in 3.2</p>
<hr />
<div>{{mirc title|On Deop - Events}}<br />
The '''ON DEOP''' event triggers whenever a user on a channel has had their op privileges (mode -o) removed.<br />
<br />
== Synopsis ==<br />
<pre>ON <level>:DEOP:<#[,#]>:<commands></pre><br />
<br />
== Parameters ==<br />
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.<br />
* '''<*><#>''' - The place, or places where the event listens, you can specify specific name of window, seperate them by comma.<br />
** '''*''' - Any channel window<br />
** '''#''' - Any channel window<br />
* '''<commands>''' - The commands to be performed when the event triggers<br />
<br />
== {{mIRC|local identifiers}} ==<br />
<br />
=== {{mIRC|$opnick}} ===<br />
<br />
Returns the nickname of the user being deopped.<br />
<br />
<br />
== Example ==<br />
Let the channel know when a user's operator privilege has been removed:<br />
<source lang="mIRC">ON *:DEOP:#:msg # Oh no, $opnick has had their operator privilege removed :(</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|3.2}}<br />
<br />
== See Also ==<br />
* [[On deowner - mIRC|ON DEOWNER]]<br />
* [[On devoice - mIRC|ON DEVOICE]]<br />
* [[On help - mIRC|ON HELP]]<br />
* [[On op - mIRC|ON OP]]<br />
* [[On owner - mIRC|ON OWNER]]<br />
* [[On voice - mIRC|ON VOICE]]<br />
* {{mIRC|/mode}}<br />
* {{mIRC|$mode}}<br />
{{mIRC on event list}}<br />
<br />
[[Category:mIRC on events|deop]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_op&diff=102322mirc/on events/on op2024-02-17T14:58:40Z<p>KindOne: /* Compatibility */ This was added in 3.2</p>
<hr />
<div>{{mirc title|On Op - Events}}<br />
The '''ON OP''' event triggers whenever a user on a channel has been elevated to a [[Channel operator - IRC|channel operator]].<br />
<br />
This event also fills the {{mIRC|$opnick}} identifier with the nickname of the user who was added to [[Channel operator - IRC|Channel operator]] status. The {{mIRC|$nick}} identifier points to the user who added them.<br />
<br />
== Synopsis ==<br />
<pre>ON <level>:OP:<#[,#]>:<commands></pre><br />
<br />
== Parameters ==<br />
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger.<br />
<br />
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The text to match in the event..<br />
<br />
<span style="display: inline-block; width: 105px;">'''<#[,#]>'''</span>The channel, or channels where the event listens.<br />
<br />
<div style="background-color: rgba(0,0,0,.03); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 60px;">'''#'''</span>Any channel if left by itself, otherwise refers to a specific channel</div><br />
<br />
<div style="background-color: rgba(0,0,0,.06); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 60px;">'''[,#]'''</span>List of specific channel names</div><br />
<br />
== Example ==<br />
Acknowledge when a user has been elevated to a channel operator:<br />
<source lang="mIRC">ON *:OP:#:msg # Congratulations, $opnick $+ ! $nick has made you a channel operator!</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|3.2}}<br />
<br />
== See Also ==<br />
* [[On deop - mIRC|ON DEOP]]<br />
* [[On deowner - mIRC|ON DEOWNER]]<br />
* [[On devoice - mIRC|ON DEVOICE]]<br />
* [[On help - mIRC|ON HELP]]<br />
* [[On owner - mIRC|ON OWNER]]<br />
* [[On serverop - mIRC|ON SERVEROP]]<br />
* [[On voice - mIRC|ON VOICE]]<br />
* {{mIRC|/mode}}<br />
* {{mIRC|$mode}}<br />
{{mIRC on event list}}<br />
<br />
[[Category:mIRC on events|op]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/unicode&diff=102321mirc/unicode2024-02-17T14:13:18Z<p>KindOne: Correct typos.</p>
<hr />
<div>{{mirc title|Unicode}}<br />
This page does not attempt to describe what [[Unicode]] is but rather how mIRC handles it (or in some cases doesn't handle it). The technical terms are omitted on purpose.<br />
<br />
=== mIRC and Unicode ===<br />
<br />
Before Unicode (mIRC 7.x), mIRC supported Windows' code pages, handling various character sets used in different parts of the world. Code pages encode characters in 8 bits (1 byte): 8 bits can be used to represent 256 values. Code pages all use the first 128 values for ASCII, and then each code page adds the required characters for the language e.g. é for French, although before unicode, for Japanese or Chinese language, they already needed more than 256 values and where already using special encoding, using more than one byte.<br />
<br />
Unicode provides a single character encoding which supports all languages using 1,114,112 distinct characters. Since IRC users are from all over the world, often using their own language and character set, using a single common character set is a major advantage.<br />
<br />
Applications can implement Unicode internally in a variety of different ways. mIRC v7+ uses UTF16 encoding internally using 16 bits or 2 bytes to hold each character. Earlier versions used US-ASCII, using 8 bits or 1 byte per character. There are two mains reasons for this:<br />
<br />
* The most frequently used characters are encoded from 0 to 65535, and with UTF16 these can be stored with only 16 bits. As a result, the mIRC code dealing with Unicode is going to be faster than UTF32.<br />
* It uses less memory than UTF32.<br />
<br />
Drawback: Characters over 65535 are encoded in utf16 as two 16 bits unit called surrogates but mIRC does not *support* this. {{mIRC|$asc}} and {{mIRC|$chr}} cannot be used with characters over 65535.<br />
<br />
<source lang="mIRc"><br />
//var -s %a = $chr(55384), %b = $chr(56320) | echo -a %a $+ %b -- $len(%a $+ %b)<br />
<br />
𦀀 -- 2<br />
</source><br />
What happens here is that mIRC pass the two surrogates to /echo, /echos call a Windows' function to display the text, and it is this Windows' function that will 'decode' the surrogates and display the character correctly. As you can see from the example above, although a single character is displayed, $len() is 2, showing that mirc sees two characters.<br />
=== $regsubex ===<br />
Whilst rendering functions will normally display characters over 65536 correctly when programmed in this way, some usages of some functions in mIRC, such as $regsubex, won't handle the surrogate as expected. <br />
<source lang="mIRc"><br />
//echo -ag $regsubex(aa,/(a)/gu,$chr($gettok(55357 56607,\n,32))) vs $replace(ab,a,$chr(55357),b,$chr(56607))<br />
</source><br />
For $regsubex this is because mIRC is using the 8 bits pcre api: when replacing it has to convert your 16 bits unit ($chr(55357) in the first iteration) to UTF8.<br />
<br />
'''Note:''' In fact mIRC does convert the two surrogates to their utf8 representation, except that this is not really correct because surrogates are not really characters; they are just code points used to form others characters, therefore it's improper to decode those bytes to that character because the general algorithm for UTF8 can still be used, and is used by mIRC here, to encode the lone surrogate. So, when mIRC decodes what $regsubex generated, to UTF8, it recognizes the illegal sequence and simply return the characters corresponding to the byte, so you get 3 characters per surrogate.<br />
<br />
=== $utfencode / $utfdecode ===<br />
You can also express those characters with their UTF8 representation using {{mIRC|$utfdecode}}, which decodes UTF8:<br />
<br />
<source lang="mIRC"><br />
;you can use utf8 to form the character 65536 for example, which is four bytes in utf8 (f0 90 80 80):<br />
//var -s %a $utfdecode($chr($base(f0,16,10)) $+ $chr($base(90,16,10)) $+ $chr($base(80,16,10)) $+ $chr($base(80,16,10)))<br />
<br />
𐀀<br />
</source><br />
<br />
$utfencode can be used to encode text to utf8:<br />
<br />
<source lang="mIRc"><br />
//var -s %a $utfencode(è)<br />
<br />
è<br />
</source><br />
<br />
=== Code Pages ===<br />
The scripting language still somewhat support code pages, you can decode text to utf8 while the bytes in the text are interpreted in the given code page.<br />
<br />
Each code page has a number (Gdi charset):<br />
<br />
* 000 - ANSI_CHARSET<br />
* 001 - DEFAULT_CHARSET<br />
* 002 - SYMBOL_CHARSET<br />
* 077 - MAC_CHARSET<br />
* 128 - SHIFTJIS_CHARSET<br />
* 129 - HANGEUL_CHARSET<br />
* 130 - JOHAB_CHARSET<br />
* 134 - GB2312_CHARSET<br />
* 136 - CHINESEBIG5_CHARSET<br />
* 161 - GREEK_CHARSET<br />
* 162 - TURKISH_CHARSET<br />
* 163 - VIETNAMESE_CHARSET<br />
* 177 - HEBREW_CHARSET<br />
* 178 - ARABIC_CHARSET<br />
* 186 - BALTIC_CHARSET<br />
* 204 - RUSSIAN_CHARSET<br />
* 222 - THAI_CHARSET<br />
* 238 - EASTEUROPE_CHARSET<br />
* 255 - OEM_CHARSET<br />
<br />
'''Note''': GDI charsets 1 and 255 are system dependent and are therefore expected to return different results across different machines. Values not on the table are treated as a reference to DEFAULT_CHARSET, equivalent to using C = 1.<br />
<br />
For example, if you want to get the text (FROM GREEK TO UTF8), which used the ISO-8859-7 (GREEK) encoding for Greek letters, in utf8, you need to encode that to utf8, interpreting the bytes as per in the GREEK code page, and then to decode that to utf8: $utfdecode($utfencode(text,161))<br />
<br />
If you want to send the text in GREEK over IRC, mIRC will encode the bytes internally so you must encode the text in utf8, and then decode to utf8, interpreting the bytes as per in the GREEK code page: /raw -n privmsg #chan $utfdecode($utfencode(text),161)<br />
<br />
It must be noted that some commands and identifiers will encode your text to utf8, changing the integrity of your input.<br />
Each character is represented as 16 bits internally, the array of character is not an array of byte, it's an array of 16 bit (two bytes).<br />
But let's take a look at "/msg #chan é".<br />
é is the code point 233, which fits in one byte, but mIRC will encode your byte 233 to utf8, giving the two bytes 165 169.<br />
Now in this case there is little value not encoding in utf8, on IRC you usually don't really care about the integrity of your bytes.<br />
However there are others features where it's not so simple.<br />
$sha1(é) for example can be tricky, this is going to give the hash of the two bytes.<br />
The reason this is happening is because of the conversion, the hashing algorithm works on an array of byte, so mIRC has to take your character (represented in an array of two bytes) and convert them to single bytes, that's why the utf8 conversion happens.<br />
And this is happening pretty much everywhere.<br />
<br />
{{mIRC|/raw|/raw -n}} can be used for IRC, it sends the data to the server without encoding the characters in the range 0-255 to utf8.<br />
<br />
{{mIRC|/sockwrite|/sockwrite -u}} can be used to the same effect, won't encode characters in the range 0-255 to utf8.<br />
<br />
=== Normalization ===<br />
It is beyond the scope of this wiki page to explain Unicode normalization in detail, but you should note when e.g. comparing unicode strings that some unicode characters with accents can be encoded as a single integrated character or equally validly as an unaccented character with a modifying accent. <br />
<br />
For example "Ô" can be sent from another IRC client either as $chr(212) or decomposed into a capital O $chr(79) followed by a combining circumflex $chr(770).<br />
<br />
Normalisation is a means of ensuring that all such characters are encoded either as the single integrated character or using modifiers in order that strings which might have a mixture of these techniques can be compared.<br />
<br />
mIRC does not support normalization of Unicode strings either explicitly OR implicitly when comparing strings. <br />
<br />
Experimentation suggests that mIRC does not normally recognize combining characters and will not display the combining character at all, which can lead to communication confusion. So a "Ô" sent decomposed into capital O $chr(79) followed by a combining circumflex $chr(770) will be displayed as "O".<br />
<br />
To complicate things still further, some unicode characters look the same as or very similar to other completely different characters - and some of these characters are always considered unequal in strict Unicode whilst others can be converted during normalization. mIRC treats such characters as different under all circumstances.<br />
<br />
=== Case insensitive comparisons ===<br />
<br />
Without normalization, mIRC therefore fails to correctly compare unicode characters. This is not only true for the scripting language but anywhere in mIRC.<br />
<br />
For example if you set a highlight entry with unicode letter, it won't work for a lower/uppercase version of that letter, same with {{mIRC|/if}}'s "==" comparison operator with unicode letter:<br />
<br />
<source lang="mIRC"><br />
//echo o === O $iif(o === O,$true,$false) , o == O $iif(o == O,$true,$false)<br />
;o === O $false , o == O $true<br />
;correct<br />
<br />
//echo ô === Ô $iif(ô === Ô,$true,$false) , ô == Ô $iif(ô == Ô,$true,$false)<br />
;ô === Ô $false , ô == Ô $false<br />
;incorrect<br />
</source><br />
<br />
However, mIRC's {{mIRC|$upper}} and {{mIRC|$lower}} identifiers correctly convert upper and lower case unicode:<br />
<source lang="mIRC"><br />
//echo $ $+ lower(Ô) = $lower(Ô) , $ $+ upper(ô) = $upper(ô)<br />
;$lower(Ô) = ô , $upper(ô) = Ô<br />
</source><br />
<br />
So case insensitive comparisons can be made by explicitly converting both sides to upper or lower case e.g. "if ($upper(%a) === $upper(%b))":<br />
<source lang="mIRC"><br />
//echo ô === $ $+ lower(Ô) $iif(ô === $lower(Ô),$true,$false) , ô == $ $+ lower(Ô) $iif(ô == $lower(Ô),$true,$false)<br />
;ô === $lower(Ô) $true , ô == $lower(Ô) $true<br />
//echo Ô === $ $+ upper(ô) $iif(Ô === $upper(ô),$true,$false) , Ô == $ $+ upper(ô) $iif(Ô == $upper(ô),$true,$false)<br />
;Ô === $upper(ô) $true , Ô == $upper(ô) $true<br />
</source><br />
<br />
=== Special Unicode characters ===<br />
<br />
There are also some special unicode characters that e.g. determine RTL / LTR display and these can cause unexpected results when displayed. However unless someone is deliberately trying to create mischief (e.g. a file name which looks innocuous but is in fact a virus laden executable file), these are not normally a problem.<br />
<br />
[[Category:mIRC|unicode]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/ipv6&diff=102320mirc/ipv62024-02-17T12:18:32Z<p>KindOne: Correct typos and use en-us for various words.</p>
<hr />
<div>{{mirc title|IPv6}}<br />
This page has been written to describe how IPv6 support has been provided in mIRC v7 onwards and the quirks of the current implementation, and to provide guidance to scripters on how to code /dns and /sockopen commands so that they work reliably regardless of the IPv4/v6 connectivity of the local and remote systems and regardless of the IP version used by the current IRC connection.<br />
<br />
This page is most relevant if your PC has both IPv4 and IPv6 connectivity to the internet as it describes issues related to the way mIRC handles domain lookups and consequent connections if you have connectivity using both IP versions.<br />
<br />
It has been written both to provide non-technical users with the practical information that they need to fix issues when they experience them, and also to explain in the simplest way possible how mIRC works and why this sometimes creates unexpected issues. Unfortunately this does make the page lengthy and a little repetitive, and for this we apologize.<br />
<br />
<br />
== Background ==<br />
mIRC was first conceived in 1995, when the Internet was in its infancy and IP version 4 seemed like it would easily scale to cope with global usage. But that was before mobile phones became IP based and the Internet of Things joined the fray.<br />
<br />
Eventually it became clear that IP version 4 would run out of addresses at some point, and a new IP version 6 Internet was launched in parallel. The IPv4 Internet and IPv6 Internet share a lot of concepts and technologies, but they are essentially separate networks, with end-points (users or servers) residing either on the IP v4 network '''or''' the IP v6 network '''or''' both. (There are some technologies that provide some co-existence functionality, but these are probably not relevant at this point.)<br />
<br />
Versions of mIRC up to v6.x supported only IP v4. Version 7.0 in April 2010 introduced the first support for IPv6 and as IPv6 started to be supported by both IRC servers and IRC users, mIRC's IPv6 functionality was tweaked through to c. 2016 and is now considered to be mature and stable. There are, however, a few quirks with how mIRC handles coexistence between IPv4 and v6, and this page will attempt to explain them.<br />
<br />
It should be recognized that mIRC's IPv6 support was implemented before there was widespread real-world usage of IPv6, and with the benefit of hindsight there are some areas in DNS name resolution where questionable decisions were made - the consequence is that mIRC (currently) has some implementation oddities that both scripters and some users need to be aware of.<br />
<br />
This page has been written to explain how mIRC's support for IPv6 works, and what you need to know to make it work when the quirks would otherwise create difficulties.<br />
<br />
== DNS primer ==<br />
Firstly a quick reminder about the purpose of DNS - if you already understand this, please feel free to skip the rest of this section. <br />
<br />
Both IPv4 and v6 use numeric addresses to identify computers and how they are connected in order to route information between them - when we humans need to use these numeric addresses we represent them as 1.2.3.4 for IPv4 and 1234:5678:90AB:CDEF:1234:5678:90AB:CDEF for IPv6. Whilst these numeric addresses are great for computers to route packets, they are not so good for giving a computer a name or for identifying the services it provides, and of course the number used to route packets can change over time even if it is still the same computer you are trying to talk to. (In other words "I am a name not just a number".) <br />
<br />
The names given to computers on the Internet (like www.wikichip.org or irc.undernet.org) are called Domain Names or hostnames, and the service provided to convert Domain Names to IP addresses is called DNS. <br />
<br />
== mIRC's quirks ==<br />
Although mIRC can make IPv6 connections to explicitly specified IPv6 addresses out of the box without '''any''' mIRC configuration settings needing to be set, unfortunately this is '''not''' the same as mIRC fully supporting IPv6 without any configuration. Whilst you '''can''' connect using an explicit IPv6 address if you wanted to (presumably having looked it up yourself manually from a hostname), we almost always prefer to use hostnames and allow programs like mIRC to lookup the associated IP addresses.<br />
<br />
mIRC does have a configuration setting for IPv6 - though it is not easy to find in mIRC's Options dialog, and even when you find it the description is not accurate. The configuration setting can be found at Tools > Options ... (alt + o) > Connect / Options > Ports... and is called "Enable IPv6 support and prioritize IPv6 over IPv4 connections" - but despite the description, this option is not needed to be set to "enable IPv6" and it only "prioritizes" IPv6 over IPv4 in some circumstances, whilst in other circumstances mIRC is effectively only supporting either IPv6 or IPv4 but not both. ''If you have IPv6 connectivity to the Internet, you should read and understand this page before deciding to set or unset this configuration option.''<br />
<br />
Another quirk in mIRC's implementation of IPv6 is that whilst it is capable of looking up both the IPv4 and IPv6 numeric addresses for a hostname, often by default (i.e. if you have both IPv4 and IPv6 internet addresses but are not explicit about wanting it to look up both IPv4 & IPv6 addresses) it limits the lookup to only one version. ''If'' the version that ''isn't'' queried then happens to be the ''only'' version that the other computer supports then mIRC will tell you that it is "* Unable to resolve server" and will ''not'' make the connection. <br />
<br />
Additionally whilst we would expect mIRC's IPv6 functionality to work consistently for the same commands or for connections to the same servers, unfortunately the IPv6 implementation can deliver different results not only depending on which IP version you are currently using to connect to IRC with, but indeed also based on what connections you may previously have made hours or even days ago in the same status window (so long as you haven't closed and reopened mIRC in the mean time). In other words, even though you may have made a connection successfully before, and even though the status window may look the same, for reasons that are not immediately obvious by looking at the screen, this time the connection doesn't work.<br />
<br />
These are the gotchas that you need to be aware of! And in the remainder of this page we are going to attempt to provide you with an explanation of what is happening and how to avoid any difficulties.<br />
<br />
== mIRC's DNS lookups ==<br />
As described above, for a domain name you can lookup either the IPv4 addresses or the IPv6 addresses or both types of address.<br />
<br />
'''mIRC decides which versions to query based on an internal state associated with the status window of the connection.'''<br />
<br />
A status window has 3 possible states regarding the version(s) of IP it uses for DNS lookups: <br />
<br />
* IPv4<br />
* IPv6<br />
* Both - IPv6/v4. <br />
<br />
mIRC will only lookup domain names on both IP versions '''by default''' when the status window state is IPv6/v4. <br />
<br />
When the status window state is either IPv4 or IPv6, it will only lookup IP addresses by default on that IP version and will not lookup IP addresses on the other IP version. If IP addresses for the host name only exist on the other IP version, you will get "Unable to resolve server" and, even though your computer is capable of connecting to the hostname using the other IP version, mIRC will not try that and your connection will not be made. <br />
<br />
Only when the internal state is IPv6/v4 will mIRC reliably make connections regardless of which IP version you are (or were previously) connected to IRC with, and which IP version the computer you are trying to connect to now is on.<br />
<br />
The internal state of the status window is set as follows:<br />
<br />
* When a new status window is opened, the IP version state is set to IPv4 if the mIRC option '''Enable IPv6 support and prioritize IPv6 over IPv4 connections''' is '''not''' enabled, and v6/v4 if it '''is''' enabled. (This setting can be found at Tools Options... (alt + o) > Connect > Options > Ports...)<br />
* Making a connection via a host name without specifying the IP version explicitly (i.e. you don't user /server -4 or -6 and don't specify an explicit IP address) does not change the status windows DNS lookup state.<br />
* Making a connection using an explicit IP address or the -4 or -6 switches, changes the DNS lookup state to that IP version. <br />
* It is not possible to change the DNS lookup state for an existing status window back to v6/v4 once it has changed to v4 or v6. It can only be reset by opening a new status window.<br />
<br />
Without knowing how the previous or current connections have been made, it is not possible for a human looking at the status window or for a script to know precisely which IP version state the status window is in (even if you can tell which IP version is currently being used to connect to to an IRC server), and it is therefore not possible to determine with absolute certainty how default DNS lookups (without switches) will behave.<br />
<br />
=== IPv6/v4 ===<br />
This is the state a status window starts with if you have enabled the mIRC option for IPv6 priority. <small>(if you use /server -m6 for example, you can still view it as a short ipv4 state and then ipv6), again</small> you cannot go back to that state once you change from it.<br />
<br />
In this state, mIRC will resolve a hostname to both IPv6 and IPv4 without explicitly telling mIRC to check both versions; IRC connections (e.g. using the connect button or /server), /sockopen and /dns without -4 and -6 switches will correctly work in all cases. In this state, this is equivalent to using these commands with the -64 switch.<br />
<br />
If mIRC resolves a hostname to '''both''' IPv6 and IPv4 addresses, it will use the IPv6 address to try to make the IRC or socket connection - this is what is meant by "IPv6 Priority".<br />
<br />
To stay in this state, you must always connect to IRC via a hostname, and never by using either /server -4 or -6 switches or an explicit IP address.<br />
<br />
Scripts using /server, /dns or /sockopen which were written for mIRC v6 (i.e. before IPv6 support) generally continue to work in this state because calls to these commands are equivalent to having specified -64.<br />
<br />
'''Summary:''' If your status window is IPv6/v4 state, then you should be able to connect to IPv4 and IPv6 hosts without any issues. But there is no easy way for a user or a script to determine when the IPv6/v4 state has been changed to IPv4 or IPv6, and then things may start to break.<br />
<br />
=== IPv6 ===<br />
This is the state you are in if you used /server -6 or used /server with an explicit IPv6 address.<br />
<br />
In this state, mIRC does not resolve hostname to an IPv4 address without explicitly requesting mIRC to do so using a -4 switch. IPv4 using hostnames is effectively disabled for this status window.<br />
<br />
If you want mIRC to resolve hostnames to IPv4 addresses and make connections over IPv4 for a status window that is IPv6, you need to use either an explicit IPv4 address or use a -4 switch on the command (i.e. /server -4, /dns -4, /sockopen -4).<br />
<br />
Scripts using /server, /dns or /sockopen which were written for mIRC v6 (i.e. before IPv6 support) will not use -4 switches (because they didn't exist when the script was written) and consequently if they are run in a status window that is IPv6 they will fail to connect to an IRC or socket server that is IPv4 only - but the script would have worked if the status window was IPv4. For scripts to work reliably they need to code -46 on all /server, /dns and /socket calls.<br />
<br />
'''Summary:''' If your status window is IPv6 state, then if you want to lookup or connect to an IPv4-only hostname, you need to explicitly code -4 on the /server, /dns or /sockopen command.<br />
<br />
=== IPv4 ===<br />
This is the state you are if you opened the status window with IPv6 priority not enabled or if you made a connection to an IRC server using either an explicit IPv4 address or used /server -4.<br />
<br />
In this state, mIRC does not resolve hostname to an IPv6 address without explicitly requesting mIRC to do so using a -6 switch. IPv6 using hostnames is effectively disabled for this status window.<br />
<br />
If you want mIRC to resolve hostnames to IPv6 addresses and make connections over IPv6 for a status window that is IPv4, you need to use either an explicit IPv6 address or use a -6 switch on the command (i.e. /server -6, /dns -6, /sockopen -6).<br />
<br />
Scripts using /server, /dns or /sockopen which were written for mIRC v6 (i.e. before IPv6 support) will not use -6 switches (because they didn't exist when the script was written) and consequently if they are run in a status window that is IPv4 they will fail to connect to an IRC or socket server that is IPv6 only. At present almost all servers have IPv4 connections so this is not a frequent issue, but in the future when IPv4 addresses are exhausted and many more computers will be IPv6 only this may become a far more frequent problem.<br />
<br />
'''Summary:''' If your status window is IPv4 state, then if you want to lookup or connect to an IPv6-only hostname, you need to explicitly code -6 on the /server, /dns or /sockopen command.<br />
<br />
== Some examples ==<br />
The following examples are for users who have both IPv4 and IPv6 internet connectivity:<br />
<br />
=== Manual server connection ===<br />
# User connects to irc.ipv4only.net using Options dialog - connects just fine using.<br />
# User does /server -6 irc.ipv6.net - connects just fine.<br />
# User tries to connect again to irc.ipv4only.net using Options dialog - connection fails - it worked only a few minutes earlier, now it doesn't - user is flummoxed.<br />
<br />
This is true regardless of the "IPv6 priority" setting.<br />
<br />
=== IPv6 priority not set ===<br />
# User connects to irc.net by IPv4.<br />
# Script to connect to www.ipv4only.com by IPv4 works just fine.<br />
# For some reason user connects to irc.net by IPv6 (for whatever reason).<br />
# Same script to connect to www.ipv4only.com by IPv4 breaks for no reason apparent to the user.<br />
<br />
== Additional SockOpen restriction ==<br />
When using /sockopen -d to bind to a specific network card IP address on your own PC (i.e. to make the socket connection originate from a specific IP address when you have several), mIRC will base its DNS resolution and subsequent connection on the IP version of the IP address you specify to bind to.<br />
<br />
If you bind to an IPv6 address (e.g. /sockopen -d 1234:5678:90AB:CDEF:1234:5678:90AB:CDEF hostname), then mIRC will only do an IPv6 lookup on the hostname (because the bind address is IPv6 and so the connection has to be IPv6, so no point in looking up IPv4 addresses).<br />
<br />
If you bind to an IPv4 address (e.g. /sockopen -d 1.2.3.4 hostname), then mIRC will only do an IPv4 lookup on the hostname (because the bind address is IPv4 and so the connection has to be IPv4, so no point in looking up IPv6 addresses). <br />
<br />
== To priorities or Not to priorities? That is the question! ==<br />
Assuming that you have IPv6 connectivity of some sort on your PC, you are (or perhaps should be) worrying about whether you should set the IPv6 priority option or not.<br />
<br />
As described above, setting IPv6 priority gives you the best chance of network connections succeeding (particularly if you ensure that you preserver the IPv6/v4 state of your status window), but it also means that your hostname-based connections will all be IPv6 where possible, and only IPv4 when an IPv6 address is not available for the hostname.<br />
<br />
If your IPv6 internet connection is native, then it is likely that the performance of your IPv6 connections will be on a par with your IPv4 connections, and you are recommended to set IPv6 priority. There should be no real down-side to this - in the event that you switch your status window from IPv6/v4 to IPv6 or IPv4, the situation would be no different had you not set this option.<br />
<br />
On the other hand, if your IPv6 internet connectivity is delivered using a gateway protocol like Teredo on your individual PC or 6to4 as part of your network infrastructure, then it is likely that your the performance of your IPv6 connections will be substantially slower than your IPv4 connections because the traffic from your PC to the server doesn't go via the shortest/quickest route but instead is sent via a gateway. In this situation, you are recommended '''not''' to set IPv6 priority, continue to connect via IPv4 and live with the occasions when connections to IPv6 are not made - which at present, whilst servers generally still all have IPv4 addresses, should be fairly rare. If you do set IPv6 priority in this situation, your IRC connections will default to IPv6 and be slower, but your ability to connect to both types of server is enhanced.<br />
<br />
== Recommendations for scripters ==<br />
To ensure that connections are made whenever they are possible, regardless of the IP version used by the status window's state, scripts should explicitly use the -46 switch on every /dns and /sockopen command in order to make a connection on the opposite IP version when needed. Scripts that have been written without this (e.g. written before IPv6 was implemented in mIRC) will not have backward compatibility and will not work reliably.<br />
<br />
Including these switches will make your script work in all circumstances regardless of the IP state of the status window:<br />
{|<br />
|-<br />
| * IPv6/v4 state || - there's no problem in this mode, you already DNS lookup on both IP versions, adding -46 won't change anything;<br />
|-<br />
| * IPv6 state || - -6 is already implied, and the -4 will additionally ensure that IPv4 DNS lookups will also be done;<br />
|-<br />
| * IPv4 state || - -4 is already implied, and the -6 will additionally ensure that IPv6 DNS lookups will also be done.<br />
|}<br />
<br />
== Impact of quirks in the future ==<br />
At present, almost all users and servers have IPv4 connections. Users connecting via IPv4 will be able to make connections to almost all servers over IPv4. Users who have IPv6 connectivity and set IPv6 priority will still get IPv4 connectivity by default unless they have explicitly connected a status window to a specific version.<br />
<br />
However with IPv4 addresses now officially exhausted, it will become increasingly likely that users and servers will be IPv6 only. Whilst IPv6 users can still set IPv6 priority and connect automatically to IPv4-only servers, IPv4-only users will NOT be able to connect to IPv6-only servers and will be forced to implement a gateway protocol like Teredo to get IPv6 connectivity for these situations. But as identified above, with the the current mIRC implementation it is '''not''' recommended to set IPv6 priority for gateway IPv6 which is substantially slower, and we can therefore reasonably expect the number of mIRC users experiencing connection difficulties of this form to increase substantially in the near future.<br />
<br />
== Potential mIRC enhancement ==<br />
As the number of IPv6 connected mIRC users increases substantially over the next few years, this issue is likely to become more frequent. In particular as IPv4/v6 connected users still connecting to IRC primarily over v4 increasingly try to make connections to end points that are IPv6 only, this incompatibility for older scripts may become a much more significant issue. <br />
<br />
It would be nice if mIRC were to recognize this likelihood and make this change now despite the potential for occasional backward compatibility issues, and in the knowledge that this change would balance these backward compatibility issues with avoiding a potentially far greater level of backward compatibility issues from existing scripts failing.<br />
<br />
The decision seems a little odd to limit mIRC's DNS lookups by default to the IP version state of the status window, rather than always to do DNS lookups for all versions that the user has Internet connectivity for - but this easy to say with the benefit of hindsight.<br />
<br />
The question for mIRC is whether to:<br />
# Retain the current implementation, preserving backwards compatibility with modern v7 scripts (if there are any) that have explicitly been written to expect that e.g. /dns or /socket calls will sometimes be limited to the IP version of the IRC connection (and sometimes won't) - but which breaks any existing scripts which use /server, /dns or /sockopen but which haven't explicitly been coded with -64 switches on any /server, /dns or /sockopen commands; OR<br />
# Change mIRC's DNS lookup behavior, preserving backwards compatibility with any existing scripts which use /server, /dns or /sockopen but which haven't explicitly been coded with -64 switches on any /server, /dns or /sockopen commands, but breaking backwards compatibility with modern v7 scripts (if there are any) that have explicitly been written to expect that e.g. /dns or /socket calls will sometimes be limited to the IP version of the IRC connection (and sometimes won't).<br />
<br />
At present, with most servers having IPv4 connectivity, this does not cause widespread connectivity issues. However as more servers become IPv6 only due to exhaustion of IPv4 addresses, IPv4 only users will be pushed into using IPv6 transition technologies to get IPv6 connectivity, and we should then expect the number of occasions when scripts fail because of the quirky DNS implementation to increase substantially.<br />
<br />
If the authors decide to change mIRC's behavior, the recommended changes are as follows:<br />
<br />
# Change the IPv6 Priority setting (and the description) to mean exactly that - for connections to hostnames with both IPv6 and IPv4 addresses, to use IPv6 rather than IPv4.<br />
# Make /server, /dns and /socket commands without -4 or -6 work as if -46 or -64 had been specified.<br />
# Make re-connections in the same window to the same server hostname as the last connection use the same IP version i.e. if you were previously connected by IPv6, then reconnect using IPv6.<br />
<br />
[[Category:mIRC|IPv6]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$vol&diff=102319mirc/identifiers/$vol2024-02-17T11:21:03Z<p>KindOne: /* Compatibility */ This was added in 5.8</p>
<hr />
<div>{{mirc title|$vol Identifier}}'''$vol''' can be used to retrieve the current volume, from the Windows audio control, for the specified sound type parameter.<br />
<br />
'''Note:''' This command is also a part of the [[Playing music - mIRC|playing music]] section.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$vol(wave | midi | song | master)</pre><br />
<br />
== Parameters ==<br />
<span style="display: inline-block; width: 70px;">'''wave'''</span>Returns the current volume for wave files.<br /><br />
<span style="display: inline-block; width: 70px;">'''midi'''</span>Returns the current volume for midi files.<br /><br />
<span style="display: inline-block; width: 70px;">'''song'''</span>Returns the current volume for mp3, ogg, and wma files.<br /><br />
<span style="display: inline-block; width: 70px;">'''master'''</span>This returns the master control volume setting for overall system volume.<br />
<br />
== Properties ==<br />
<span style="display: inline-block; width: 50px;">'''mute'''</span>Returns the current ''mute'' settings for the specified sound type parameter.<br />
<br />
== Examples ==<br />
Echo the mute status for mp3 files to the active window:<br />
<source lang="mIRC">//echo -a $vol(song).mute</source><br />
<br />
Echo the current master system volume to the active window:<br />
<source lang="mIRC">//echo -a $vol(master)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.8}}<br />
<br />
== See also ==<br />
* [[Playing Music - mIRC|Playing Music]]<br />
* [[On midiend - mIRC|ON MIDIEND]]<br />
* [[On mp3end - mIRC|ON MP3END]]<br />
* [[On nosound - mIRC|ON NOSOUND]]<br />
* [[On waveend - mIRC|ON WAVEEND]]<br />
* {{mIRC|$inmidi}}<br />
* {{mIRC|$insong}}<br />
* {{mIRC|$inwave}}<br />
* {{mIRC|$sound}}<br />
* {{mIRC|/splay}}<br />
* {{mIRC|/vol}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|vol]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/beep&diff=102316mirc/commands/beep2024-02-15T20:22:25Z<p>KindOne: /* Parameters */ Note the max and min.</p>
<hr />
<div>{{mirc title|/beep Command}}<br />
The '''/beep command''' can be used to generate simple tones on the speaker. The command can also perform the beeps multiple times and with certain delay.<br />
<br />
== Synopsis ==<br />
/beep [number] [delay]<br />
<br />
== Switches ==<br />
None<br />
<br />
== Parameters ==<br />
* '''[number]''' - Number of beeps, default to 3 if not specified.<br />
* '''<delay>''' - Delay in milliseconds, minimum is 50 and maximum is 999.<br />
<br />
== Example ==<br />
<syntaxhighlight lang="mIRC">;Beep 3 times with a second delay<br />
/beep 3 1000</syntaxhighlight><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|3.2}}<br />
<br />
== See also ==<br />
* [[List of commands - mIRC|List of commands]]<br />
* [[List of identifiers - mIRC|List of identifiers]]<br />
* {{mIRC|$vol}}<br />
* {{mIRC|$ebeeps}}<br />
* {{mIRC|/ebeeps}}<br />
* {{mIRC|/sound}}<br />
* {{mIRC|/speak}}<br />
* {{mIRC|/vol}}<br />
{{mIRC command list}}<br />
<br />
[[Category:mIRC commands|beep command - mIRC]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$day&diff=102315mirc/identifiers/$day2024-02-15T19:56:52Z<p>KindOne: /* Compatibility */ This was added in 3.5</p>
<hr />
<div>{{mirc title|$day Identifier}}The '''$day''' identifier returns the full name of the current day of the week, eg: Monday, Tuesday, etc.<br />
<br />
<br />
== Synopsis ==<br />
<pre>$day</pre><br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example ==<br />
Echo the current day to the active window:<br />
<source lang="mIRC">//echo -a $day</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|3.5}}<br />
<br />
== See Also ==<br />
* {{mIRC|$asctime}}<br />
* {{mIRC|$date}}<br />
* {{mIRC|$fulldate}}<br />
* {{mIRC|$time}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|day]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$line&diff=102314mirc/identifiers/$line2024-02-15T19:29:16Z<p>KindOne: /* Synopsis */ Add .property</p>
<hr />
<div>{{mirc title|$line Identifier}}'''$line''' returns the Nth line in a window<br />
<br />
<br />
== Synopsis ==<br />
<pre>$line(win,N,T)[.property]</pre><br />
<br />
== Parameters ==<br />
* '''win''' - a channel/query/status or custom window<br />
* '''N''' - The Nth line, returns the total number of lines if N = 0<br />
* '''T''' - If T = 1, it references the listbox (nicklist in channel window), T = 0 references the display area<br />
<br />
== Properties ==<br />
* '''.state''' - returns selection state for a line in a listbox.<br />
* '''.color''' - returns the color of the line, if any.<br />
<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $line($chan(1),1)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.0}}<br />
<br />
== See Also ==<br />
* {{mIRC|$sline}}<br />
* {{mIRC|$fline}}<br />
* {{mIRC|$window}}<br />
<br />
[[Category:mIRC identifiers]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$line&diff=102313mirc/identifiers/$line2024-02-15T19:27:21Z<p>KindOne: /* Compatibility */ This was added in 5.0 And fix See Also formatting</p>
<hr />
<div>{{mirc title|$line Identifier}}'''$line''' returns the Nth line in a window<br />
<br />
<br />
== Synopsis ==<br />
<pre>$line(win,N,T)</pre><br />
<br />
== Parameters ==<br />
* '''win''' - a channel/query/status or custom window<br />
* '''N''' - The Nth line, returns the total number of lines if N = 0<br />
* '''T''' - If T = 1, it references the listbox (nicklist in channel window), T = 0 references the display area<br />
<br />
== Properties ==<br />
* '''.state''' - returns selection state for a line in a listbox.<br />
* '''.color''' - returns the color of the line, if any.<br />
<br />
<br />
== Example ==<br />
<source lang="mIRC">//echo -a $line($chan(1),1)</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.0}}<br />
<br />
== See Also ==<br />
* {{mIRC|$sline}}<br />
* {{mIRC|$fline}}<br />
* {{mIRC|$window}}<br />
<br />
[[Category:mIRC identifiers]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_songend&diff=102312mirc/on events/on songend2024-02-15T19:11:39Z<p>KindOne: /* Compatibility */ This was added in 6.0</p>
<hr />
<div>{{mirc title|On songend - Events}}<br />
The '''ON songend''' event triggers whenever a file has finished playing via the {{mIRC|/splay}} command.<br />
<br />
This event fills the '''[[$filename identifier - mIRC|$filename identifier]]''', which will be set to the complete location and filename of the sound file that just ended.<br />
<br />
== Synopsis ==<br />
<pre>ON <level>:songend:<commands></pre><br />
<br />
== Parameters ==<br />
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.<br />
* '''<commands>''' - The commands to be performed when the event listener's criteria is met.<br />
<br />
== Examples ==<br />
Echo to the active window when the sound file has ended, including its filename:<br />
<source lang="mIRC">ON *:songend:echo -a $nopath($filename) has ended</source><br />
<br />
The example above will output results similar to the contents below:<br />
<pre>Chopin - Four Scherzos.mp3 has ended</pre><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|6.0}}<br />
<br />
== See Also ==<br />
* [[Playing Music - mIRC|Playing Music]]<br />
* [[On midiend - mIRC|ON MIDIEND]]<br />
* [[On nosound - mIRC|ON NOSOUND]]<br />
* [[On waveend - mIRC|ON WAVEEND]]<br />
* {{mIRC|$inmidi}}<br />
* {{mIRC|$insong}}<br />
* {{mIRC|$inwave}}<br />
* {{mIRC|$sound}}<br />
* {{mIRC|$vol}}<br />
* {{mIRC|/splay}}<br />
* {{mIRC|/vol}}<br />
{{mIRC on event list}}<br />
<br />
[[Category:mIRC on events|songend]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/identifiers/$urlget&diff=102311mirc/identifiers/$urlget2024-02-15T13:06:02Z<p>KindOne: Add e switch</p>
<hr />
<div>{{mirc title|$urlget identifier}}'''$urlget''' sends a HEAD/GET/POST/PUT/PATCH/DELETE to an http server. Returns an ID. Can also be used to get infos about current running $urlget.<br />
<br />
== Synopsis ==<br />
<source lang="mIRC"><br />
$urlget(url,hgpuadfbtike,<target>,<alias>,[&headers],[&body])<br />
$urlget(N/ID,cr)<br />
$urlget(N/ID)[.prop]<br />
</source><br />
<br />
== Parameters ==<br />
<br />
* '''url''' - the url to access, must be prefixed with http:// or https:// (maximum url characters are <b>2000</b>)<br />
* '''hgpuadfbrtice''' - switches to indicate how to proceed:<br />
** '''hgpuad''' - '''h''' for HEAD, '''g''' for GET, '''p''' for POST, '''u''' for PUT, '''a''' for PATCH, '''d''' for DELETE<br />
** '''fb''' - '''f''' to output the answer (without the responses headers) to a file, '''b''' to ouput to a binvar<br />
** '''r''' - resumes the processing, <br />
** '''t''' - uses .part file if necessary<br />
** '''i''' - ignores SSL errors<br />
** '''c''' - cancel the processing<br />
** '''k''' - prevent redirection<br />
** '''e''' - save failed download reply to the &binvar/file<br />
* '''target''' - the output: the filename if you used '''f''', or a &binvar for '''b'''<br />
* '''alias''' - the name of the alias that is called at the end, this alias is called as a command with one parameter passed to it: the ID<br />
* '''headers''' - optional, a &binvar containing the headers to be sent, separated by $crlf<br />
* '''body''' - optional, a &binvar containing the data to be sent when you are POSTing<br />
* '''ID/N''' - the Nth urlget or the urlget referenced by the ID<br />
<br />
== Properties ==<br />
<br />
* '''.url''' - returns the url used<br />
* '''.redirect''' - returns the value of the location header if available<br />
* '''.method''' - returns the method used (GET/POST)<br />
* '''.type''' - returns the type of output, (binvar/file)<br />
* '''.target''' - returns the value of target (name of the binvar or filename)<br />
* '''.alias''' - returns the name of the alias used<br />
* '''.id''' - returns the ID.<br />
* '''.state''' - returns the state (ok, connect, download, fail)<br />
* '''.size''' - returns the value of the content-lenght header<br />
* '''.resume''' - returns 0 or 1 depending on if you are resumed/paused?<br />
* '''.rcvd''' - returns the number of bytes received after the header, could be different from .size after a failed download.<br />
* '''.time''' - returns the time taken to complete the processing, in millisecond<br />
* '''.reply''' - returns the response headers<br />
<br />
== Example ==<br />
Usage: /download https://www.mirc.com/versions.txt<br />
<source lang="mIRC"><br />
alias download {<br />
if (!$1) { return }<br />
<br />
if ($1 isnum) { <br />
if ($urlget($1).state == fail) { echo 4 -at Error: Connection issues! | return }<br />
<br />
.run notepad.exe $qt($urlget($1).target)<br />
}<br />
else {<br />
var %file = source.txt<br />
<br />
write -c $qt(%file)<br />
<br />
return $urlget($1,gfi,%file,download)<br />
}<br />
}</source><br />
<br />
----------<br />
<br />
Type /urlget.test<br />
<source lang="mIRC">; > POST / HTTP/1.1<br />
; > Accept: */*<br />
; > Test: Header<br />
; > Accept-Encoding: gzip, deflate<br />
; > User-Agent: mIRC<br />
; > Host: localhost<br />
; > Content-Length: 19<br />
; > Connection: Keep-Alive<br />
; > Cache-Control: no-cache<br />
; > foo1=bar1&foo2=bar2<br />
; < HTTP/1.1 200 OK<br />
; < Connection: close<br />
; < Content-Length: 5<br />
; < hello<br />
; url http://localhost/<br />
; redirect http://localhost/<br />
; method post<br />
; type binvar<br />
; target &target<br />
; alias urlget.callback<br />
; id 1027<br />
; state ok<br />
; size 5<br />
; resume 0<br />
; rcvd 5<br />
; time 125<br />
; reply HTTP/1.1 200 OKConnection: closeContent-Length: 5<br />
; response hello<br />
<br />
<br />
<br />
alias urlget.test {<br />
urlget.listen <br />
var %url = $iif($1,$1,http://localhost/)<br />
bset -t &header 1 Test: Header<br />
bset -t &body 1 foo1=bar1&foo2=bar2<br />
<br />
var %id = $urlget(%url,pb,&target,urlget.callback,&header,&body)<br />
}<br />
<br />
alias urlget.callback {<br />
var %id = $1<br />
<br />
echo -agi9 url $urlget(%id).url<br />
echo -agi9 redirect $urlget(%id).redirect<br />
echo -agi9 method $urlget(%id).method<br />
echo -agi9 type $urlget(%id).type<br />
echo -agi9 target $urlget(%id).target<br />
echo -agi9 alias $urlget(%id).alias<br />
echo -agi9 id $urlget(%id).id<br />
echo -agi9 state $urlget(%id).state<br />
echo -agi9 size $urlget(%id).size<br />
echo -agi9 resume $urlget(%id).resume<br />
echo -agi9 rcvd $urlget(%id).rcvd<br />
echo -agi9 time $urlget(%id).time<br />
echo -agi9 reply $urlget(%id).reply<br />
<br />
if ($urlget(%id).type == binvar) {<br />
echo -agi9 response $bvar($urlget(%id).target,1-3000).text<br />
}<br />
}<br />
<br />
alias urlget.listen {<br />
if (!$sock(urlget.listen)) socklisten -d 127.0.0.1 urlget.listen 80<br />
}<br />
<br />
on *:socklisten:urlget.listen:{<br />
var %sockname = urlget.client. $+ $ticks<br />
if ($sock(%sockname)) return<br />
<br />
sockaccept %sockname<br />
}<br />
<br />
on *:sockread:urlget.client.*:{<br />
var %header<br />
<br />
if (!$sock($sockname).mark) {<br />
sockread %header<br />
while (%header != $null) {<br />
echo 3 -ag > %header<br />
if ($regex(%header,Content-Length: (\d+))) {<br />
hadd -m $sockname content-length $regml(1)<br />
}<br />
sockread %header<br />
}<br />
if ($sockbr) sockmark $sockname $true<br />
}<br />
<br />
if ($sock($sockname).mark) && ($sock($sockname).rq) {<br />
sockread &read<br />
<br />
while ($sockbr) {<br />
hinc $sockname content-read $sockbr<br />
echo 6 -agi2 > $bvar(&read,1-3000).text<br />
<br />
sockread &read<br />
}<br />
}<br />
<br />
if ($hget($sockname,content-length) == 0) || ($v1 == $hget($sockname,content-read)) {<br />
socket.respond $sockname hello<br />
hfree -w $sockname<br />
}<br />
}<br />
<br />
alias -l sockwrite {<br />
echo 12 -ag < $3-<br />
sockwrite $1-<br />
}<br />
<br />
alias -l socket.respond {<br />
var %sockname = $$1, %data = $2-<br />
sockwrite -n %sockname HTTP/1.1 200 OK<br />
sockwrite -n %sockname Connection: close<br />
sockwrite -n %sockname Content-Length: $len(%data)<br />
sockwrite -n %sockname $+($crlf,%data)<br />
}<br />
<br />
</source><br />
<br />
cancelling and resuming<br />
<source lang="mIRC"><br />
;cancel the first $urlget request currently running<br />
$urlget(1,c)<br />
<br />
<br />
;resume the request identified by the id <id><br />
$urlget(<id>,r)<br />
</source><br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|7.56}}<br />
<br />
== See also ==<br />
* {{mIRC|/url}}<br />
* {{mIRC|$url}}<br />
{{mIRC identifier list}}<br />
<br />
[[Category:mIRC identifiers|urlget]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/on_events/on_connect&diff=102310mirc/on events/on connect2024-02-15T12:56:54Z<p>KindOne: /* Compatibility */ This was added in 5.0</p>
<hr />
<div>{{mirc title|On Connect - Events}}<br />
The '''ON CONNECT''' event triggers when mIRC has successfully connected to an IRC server and that IRC server has displayed its [[MOTD]].<br />
<br />
== Synopsis ==<br />
<pre>ON <level>:CONNECT:<commands></pre><br />
<br />
== Parameters ==<br />
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.<br />
<br />
* '''<commands>''' - The commands to be performed when the event triggers<br />
<br />
== Examples ==<br />
<source lang="mIRC">; Echo the server and network<br />
; names to the active window<br />
ON *:CONNECT:echo -a Server: $server -- Network: $network</source><br />
<br />
If a successful connection is made to an IRC server, the above code will display something similar to the below example:<br />
<pre>Server: chicago.il.us.undernet.org -- Network: UnderNet</pre><br />
<br />
<source lang="mIRC">; Join a single channel,<br />
; #myChannel, upon successful connection<br />
<br />
ON *:CONNECT:join #myChannel</source><br />
<br />
When a successful connection is made to a server, mIRC will now join the channel '''#myChannel'''.<br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.0}}<br />
<br />
== See Also ==<br />
* [[On connectfail - mIRC|ON CONNECTFAIL]]<br />
* [[On disconnect - mIRC|ON DISCONNECT]]<br />
* {{mIRC|$network}}<br />
* {{mIRC|$server}}<br />
{{mIRC on event list}}<br />
<br />
[[Category:mIRC on events|connect]]</div>KindOnehttps://en.wikichip.org/w/index.php?title=mirc/commands/cnick&diff=102304mirc/commands/cnick2024-02-14T05:37:57Z<p>KindOne: /* Compatibility */ This was added in 5.9</p>
<hr />
<div>{{mirc title|/cnick Command}}<br />
The '''/cnick command''' allows you to modify items from the address book's nick color list.<br />
<br />
== Synopsis ==<br />
/cnick -rfaniovpylNmNsN [nick[!user@host]] [color] [modes] [levels]<br />
<br />
/cnick <on/off> <br />
<br />
== Switches ==<br />
* '''-r''' - Removes the specified nick or address<br />
* '''-f''' - Forces mIRC to add another item instead of replacing an existing one<br />
* '''-a''' - Sets the Any Mode option<br />
* '''-n''' - Sets the No Mode option<br />
* '''-i''' - Sets the ignore option<br />
* '''-o''' - Sets the op option<br />
* '''-v''' - Sets the voice option<br />
* '''-p''' - Sets the protect option<br />
* '''-y''' - Sets the notify list option<br />
* '''-lN''' - Sets the idle time<br />
* '''-mN''' - Sets the highlight method (0-2) <br />
* '''-sN''' - Sorts the item into the Nth position in the list<br />
<br />
== Parameters ==<br />
* '''[nick[!user@host]]''' - Nickname or the host mask to be added<br />
* '''[color]''' - The color to assign the nick/host. 0-98 or autocolor=*<br />
* '''[modes]''' - List of modes that is required for the nick/host (Ed. ~&@%+)<br />
* '''[levels]''' - Access level form the user list<br />
* '''<on/off>''' - turns nick colors on or off<br />
<br />
== Example ==<br />
<syntaxhighlight lang="mIRC">;Turn nick color on<br />
/cnick on<br />
;Add color 5 for all Operators<br />
/cnick * 5 @<br />
;Add color 3 for all half-op<br />
/cnick * 3 %</syntaxhighlight><br />
<br />
== AutoColor ==<br />
Starting v7.58 you can now have nicks pseudo-randomly colored based on the nick. The rules appear to be:<br />
1. colors chosen for the auto-color palette depend on the RGB value of $color(background) (even if that is a different color than the background for the nicklist)<br />
2. If a color index has an RGB value matching one that's already been chosen, the 2nd color index is not chosen. This means that for the "mIRC Classic" scheme where index 4 and 52 have the same RGB, that it will not choose both 4 and 52 into the palette.<br />
3. Colors are chosen if an algorithm determines that their RGB has sufficient contrast against the background RGB, with no attempt to avoid 2 colors in the palette not contrasting against each other.<br />
4. If there is another Nick Colors rule already using a color index, that index is not chosen for auto-color even if it contrasts well. That means you can have a rule to make all @op nicks be color 4 red, and index 4 will not be added to the palette. However, since 4 is not chosen, 52 being identical RGB to color 4 can still be chosen if it contrasts against the background.<br />
5. Each time a color rule is added/removed to/from Nick Colors and you click OK, the palette is recalculated to see the palette changes. Same goes for each time /color Background N is used, even if that does not change to a different index. But it does not automatically update the palette when using the /cnick command.<br />
6. The nick's color is based on the case-sensitive value of the nick itself, so it does change if using 'Maroon' vs 'maroon' and does not change due to the nick being at a different network or if the address changes.<br />
7. Because the auto color for the same nick depends on the number of colors in the autocolor palette, adding or removing another rule can change the number of colors in the palette, which changes the bucket of colors into which each nick is placed.<br />
<br />
If you find that the autocolor is using too many colors which do not contrast against the background, there are some workarounds which may or may not work for you.<br />
<br />
One is to change your black background from index 1 to one of the color indices like 89 or 90 which look like black but have slightly different RGB which causes a different batch of colors to be chosen for the palette. However, be aware that this can have an adverse effect on colored strings which normally change color 1 into color 0 if the background is also index 1 - and those will no longer do the same for background 88 even if that has an identical RGB to index 1<br />
<br />
Another is to take advantage of the fact that colors used by other nick color rules are not chosen for the autocolor palette, so you can simply create a dummy rule that won't actually match any nicks, but the presence of this rule will prevent it being chosen for the autocolor palette. To do this, you can use the Alt+P editor to place this line into your nicklist popups menu. (If putting into a dropdown menu you probably need to prefix the label with a .period)<br />
<br />
Dummy rule for autocolor $nick($chan,$1).color : var %color $nick($chan,$1).color | !.cnick -m2s $+ $calc(1+$cnick(0)) ;dummycolor $+ %color %color @ | !.color background $color(background)<br />
<br />
This creates a menu item that shows you the color being used by that nick, and you can add a dummy rule to your nick colors list which uses that color - by simply right-clicking on a nick that you can't read because that color does not contrast against the background, and choosing this command. Note that it contains the command to reset the background to the existing background color, because that's necssary to force the autocolors to reset based on the new palette that has 1 fewer colors in it.<br />
<br />
If you want to use that color again, you can simply go to the Nick Colors tab of the address book and delete it.<br />
<br />
== Compatibility ==<br />
{{mIRC compatibility|5.9}}<br />
<br />
== See also ==<br />
* {{mIRC|$abook}}<br />
* {{mIRC|$cnick}}<br />
* {{mIRC|$nick}}<br />
* {{mIRC|/abook}}</div>KindOne