From WikiChip
Editing mirc/on events/on dialog

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

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

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

Latest revision Your text
Line 1: Line 1:
{{mirc title|On Dialog - Events}}
 
 
The '''ON DIALOG''' event listens for events which take place inside of custom [[Dialogs - mIRC|dialog windows]].
 
The '''ON DIALOG''' event listens for events which take place inside of custom [[Dialogs - mIRC|dialog windows]].
  
Line 6: Line 5:
  
 
== Parameters ==
 
== Parameters ==
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.
+
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
  
* '''<name>''' - The dialog name that this event triggers for, {{mIRC|wildcard}} accepted.
+
<span style="display: inline-block; width: 105px;">'''<name>'''</span>The dialog name that this event triggers for; [[wildcards]] accepted.
  
* '''<event>''' - The dialog event that this event triggers for, {{mIRC|wildcard}} accepted.
+
<span style="display: inline-block; width: 105px;">'''<event>'''</span>The dialog event that this event triggers for; [[wildcards]] accepted.
  
* '''<id>''' - The id name of the dialog item to listen for, {{mIRC|wildcard}} accepted. Multiple IDs can be specified in the form: 1,2,3,4-8,9
+
<span style="display: inline-block; width: 105px;">'''<id>'''</span>The id name of the dialog item to listen for; [[wildcards]] accepted. Multiple IDs can be specified in the form: 1,2,3,4-8,9
  
== {{mIRC|local identifiers}} ==
 
 
=== {{mIRC|$dname}} ===
 
 
Returns the name of the dialog.
 
 
=== {{mIRC|$devent}} ===
 
 
Returns the name of the event.
 
 
=== {{mIRC|$did}} ===
 
 
Returns the ID of the control.
 
  
 
== Events ==
 
== Events ==
Line 32: Line 18:
 
|-
 
|-
 
! Event !! Description
 
! Event !! Description
|-
 
| '''active'''<span style="margin-right: 15px;"></span> || <span style="padding-left: 15px;"></span>Triggers when the dialog is made active.
 
 
|-
 
|-
 
| '''close'''<span style="margin-right: 15px;"></span> || <span style="padding-left: 15px;"></span>Triggered when a dialog has been closed.
 
| '''close'''<span style="margin-right: 15px;"></span> || <span style="padding-left: 15px;"></span>Triggered when a dialog has been closed.
Line 80: Line 64:
 
In the example above, we have created an [[Aliases - mIRC|alias]], '''mouseListener''', to handle a local [[Dialogs - mIRC|dialog]], which cannot be seen outside of the scope of whatever script file it is saved to. This will help make sure no other dialogs collide with this dialog and its events.
 
In the example above, we have created an [[Aliases - mIRC|alias]], '''mouseListener''', to handle a local [[Dialogs - mIRC|dialog]], which cannot be seen outside of the scope of whatever script file it is saved to. This will help make sure no other dialogs collide with this dialog and its events.
  
This example can be triggered by typing the following command:
+
After the dialog has been started by entering the command ''/mouseListener'', the mouse event will now listen. When the mouse begins moving around inside of the dialog, the X and Y positions of the mouse are represented inside of the ''text'' components of ID 3, and 5, respectively.
<pre>/mouseListener</pre>
 
 
 
Once the demo has begun, the mouse event will now listen. When the mouse begins moving around inside of the dialog, the X and Y positions of the mouse are represented inside of the ''text'' components of ID 3, and 5, respectively.
 
  
 
Clicking the ''Close'' button will close the dialog and halt event listening.
 
Clicking the ''Close'' button will close the dialog and halt event listening.
Line 110: Line 91:
 
   did -ra $dname 2 $devent
 
   did -ra $dname 2 $devent
 
   did -ra $dname 4 $did
 
   did -ra $dname 4 $did
   did -ra $dname 6 $iif($did == 0,NA,$iif($did($did),$v1,$iif($did($did).sel,$v1,$iif($did($did) == 0,0,NA))
+
   did -ra $dname 6 $iif($did == 0,NA,$iif($did($did),$v1,$iif($did($did).sel,$v1,NA)))
 
   did -ra $dname 10 $did(9).state
 
   did -ra $dname 10 $did(9).state
 
}</source>
 
}</source>
  
Once saved into a script file inside of the mIRC remotes, the above example can be executed by typing the following command:
+
Once saved into a script file inside of the mIRC remotes, the above example can be executed by typing the command: ''/whatEvents''
<pre>/whatEvents</pre>
 
  
 
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.
 
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.
  
 
== Compatibility ==
 
== Compatibility ==
{{mIRC compatibility|5.5}}
+
Added: mIRC v5.5
 +
 
 +
Added On: 08/01/99
  
 
== See Also ==
 
== See Also ==
* {{mIRC|$dname}}
+
[[/dialog command - mIRC|/dialog]]
* {{mIRC|$devent}}
+
[[/did command - mIRC|/did]]
* {{mIRC|$did}}
+
[[$dialog identifier - mIRC|$dialog]]
* {{mIRC|$didwm}}
+
[[$did identifier - mIRC|$did]]
* {{mIRC|$didreg}}
+
[[On dialog - mIRC|ON DIALOG]]
* {{mIRC|$didtok}}
 
* {{mIRC|/dialog}}
 
* {{mIRC|/did}}
 
* {{mIRC|/didtok}}
 
{{mIRC on event list}}
 
  
[[Category:mIRC on events|dialog]]
+
[[Category:mIRC on events]]

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

Cancel | Editing help (opens in new window)