Simplifying your dialog scripting with text id names
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Tutorials
 
hixxy  -  Sun Jan 08, 2012 7:16 am Reply with quote
A simple method that I've used for the past couple of years to make dialog scripting a lot easier, is to use aliases to refer to the ID's.

mIRC allows you to use an alias as the ID, so you can do this for example:

Code
 


Please note this isn't my dialog, just one I borrowed from a random post on this forum to illustrate the idea behind this.

Even if you cannot remember the name of every single id identifier, you can scroll back through your script and look at the list of aliases rather than having to refer to the dialog table code itself every time.

You can then use your events like so:

Code
 


As you can see, it is much easier to remember text identifier names as opposed to ID numbers.

This also makes it much easier to change the ID at a later stage, because you need only change it in your id_<name> alias rather than in the table itself and in all of your events.

In the dialog above I haven't bothered adding id aliases for static controls like "text" that don't really do anything, but you can do if you like.

The only downside to this method is that you cannot refer to dialog ID's in the event definition itself.

Code
 


I recommend everybody try this, it makes dialog scripting a lot easier. Smile
TheImrac  -  Sun Jan 08, 2012 6:18 pm Reply with quote
Interesting!

I would also think something like:

Code
 


Would be useful too
Yawhatnever  -  Mon May 14, 2012 4:43 pm Reply with quote

TheImrac wrote

Interesting!

I would also think something like:

Code
 


Would be useful too


It could be, but if you use $findtok() then you'd have to include names of IDs (or meaningless filler tokens) that you won't reference other than when you created the dialog. If you look at the original example he skips over a lot of numbers.
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Tutorials All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.