mIRC Homepage
Posted By: RusselB Dialog question - 11/02/06 06:03 AM
When you setup a dialog id as a check-box, you can enter text to be displayed in order to show what that check-box is for.
What I'm wondering (and I wasn't able to find anything in the help file or online via search) is, how do I go about referencing that text? I know that there must be a way of doing so, since Dialog Studio (which I use for design layout of my dialogs) would have to use something similar.
Posted By: Mail Re: Dialog question - 11/02/06 06:34 AM
This is an example of part of a group manager i made. Hope it helps. It shows the text to the left of the radio buttons. Same concept as using check boxes.
Code:
   text "Revenge", 205, 4 25 45 10, nowrap
  radio "", 5, 55 25 15 10, style 3state
  radio "", 6, 75 25 15 10, style 3state 
Posted By: RusselB Re: Dialog question - 11/02/06 09:01 AM
Sorry, it doesn't. Maybe this will clarify things a bit
Code:
   check "Ops", 10, 170 15 30 10
 

That's a check box that's from my code (the rest of the code isn't necessary for what I'm wondering).
What I want to do, is get the word Ops returned when the check box is checked.
Now, I realize I could use
Code:
 on *:dialog:dname:sclick:10:{
if $did(10).state echo -a Ops
}
 

But, I've actually got three controls like that. One for Ops, one for Half-Ops, and one for Voice
I'm currently using
Code:
 on *:dialog:dname:sclick:10,12,13:{
;more code here
}
 

Which works fine, but I want the text related to the ID to be returned.
The only way that I've been able to think of is to use
Code:
 if $did(10).state echo -a Ops
if $did(12).state echo -a Hops
if $did(13).state echo -a Voice
 


I was just wondering, since the words are, in some way, associated with the check box already, could I refer to that word, rather than having to recode it?
Posted By: genius_at_work Re: Dialog question - 12/02/06 01:21 AM
Code:
on *:DIALOG:[color:red]dname[/color]:sclick:10,12,13:{
  echo -a $did($did).text
}


Voila.

-genius_at_work
Posted By: RusselB Re: Dialog question - 12/02/06 03:47 AM
Once again I find myself thanking you, genius_at_work
© mIRC Discussion Forums