mIRC Home    About    Download    Register    News    Help

Print Thread
Dialog question #141570 11/02/06 06:03 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: Dialog question #141571 11/02/06 06:34 AM
Joined: Aug 2005
Posts: 18
M
Mail Offline
Pikka bird
Offline
Pikka bird
M
Joined: Aug 2005
Posts: 18
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 

Re: Dialog question #141572 11/02/06 09:01 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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?

Re: Dialog question #141573 12/02/06 01:21 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Code:
on *:DIALOG:[color:red]dname[/color]:sclick:10,12,13:{
  echo -a $did($did).text
}


Voila.

-genius_at_work

Re: Dialog question #141574 12/02/06 03:47 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Once again I find myself thanking you, genius_at_work