|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
According to the help file /did -ftebvhnmcukradiogjsl name id [n] [text | filename]
You can access the edit control in a combobox by using 0 as the N value Presuming this worked correctly, I'm having a problem with this code. (Note: I think I have included more than necessary, and the code is written for someone that has IRCops Services Admin level on a network runnning UnrealIRCd) dialog forbid {
title "Forbidden Nicks/Channels"
size -1 -1 475 420
option pixels
icon $scriptdirCanada.ico
check "Nick/Channel", 1, 10 95 120 16, 3state push
combo 2, 10 110 120 300, size edit
text "Expires After", 3, 135 95 125 16, center
combo 4, 135 110 125 300, size edit
button "Close", 5, 10 10 75 25, ok
button "Apply/Add", 6, 10 35 75 25
button "Remove", 7, 10 60 75 25
text "Time to be specified in valid time format", 8, 135 10 125 30, center
text "Use 0 (zero) for No Expiry", 9, 135 40 125 15, center
text "Reason", 10, 265 95 200 16, center
combo 11, 265 110 200 300, size edit
icon 12, 355 10 64 64, $scriptdirFace.jpg, 0
link "Russel Bairstow", 13, 275 15 75 16
check "Auto-Check Time", 14, 135 55 100 16
edit "3 hrs", 15, 135 73 100 21, right
}
on *:dialog:forbid:sclick:1:{
if !$did(1).state {
did -rb $dname 2,4,11
did -ra $dname 1 Nick/Channel
}
elseif $did(1).state = 1 {
did -re $dname 2,4,11
did -ra $dname 1 Nick(s)
.enable #forbidden_nicks
.stats Q
}
else {
did -re $dname 2,4,11
did -ra $dname 1 Channel(s)
.enable #forbidden_nicks
.stats r
}
}
#forbidden_nicks off
raw 304:*:{
did -a forbid 2 $3
did -a forbid 11 $7-
haltdef
}
raw 217:*:{
did -a forbid 2 $3
did -a forbid 11 $7-
haltdef
}
raw 219:*:{
.disable #forbidden_nicks
haltdef
}
#forbidden_nicks end
on *:dialog:forbid:sclick:2:{
did -e $dname 7
did $dname 11 0 $did(11,$did(2).sel)
}
What I'm wanting that to do, is take the line that has the reason and put it into the edit box of ID 11 when the related line in ID 2 is selected. ie: If I click the 3rd line in ID 2, then the reason that's on the 3rd line of ID 11 should be posted in the edit box of ID 11 (the process of clicking the item in 2 automatically puts it into the edit box for ID 2)
|
|
|
|
Joined: Feb 2005
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 342 |
Hate to be "Mr. Obvious" here But the reason that isn't working is because you're using on *:dialog:forbid: You should be using: on *:dialog:forbiddennicks/channels:sclick:1:{ I was going to test it myself, however, I just recently installed a new hard drive and haven't put UnrealIRCd on my new hard drive yet. Edit: "put it" should be "put UnrealIRCd"
Last edited by Rand; 01/04/07 10:41 AM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Why, Rand? That's the *title* of his dialog, but not the name of it. The name is forbid. The problem is in this code:
on *:dialog:forbid:sclick:2:{
did -e $dname 7
did $dname 11 0 $did(11,$did(2).sel)
}
Read the help for $did. You don't have a valid $did. Also, .sel returns a number, not text. .seltext is for text.
on *:dialog:forbid:sclick:2:{
did -e $dname 7
did -ra $dname 11 0 $did(2).seltext
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
$did(11,$did(2).sel) is fine. If line 2 was selected in ID 2, then it should find line 2 in ID 11.
The problem is that he's using /did with no switches, I'm guessing.
I'm not 100% sure I understood the question but I'll have a play around with the dialog.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Ah, I read that wrong. And I didn't realize you can pull it that way with $did and didn't see that in the help file. Anyhow, it could be that he's not using -ra switches (or similar), like you mentioned.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Except yours doesn't work either... The red part in on *:dialog:forbiddennicks/channels:sclick:1: is interpreted as a command because of the slash, so when you click the control with id = 1, the Channel Central dialog pops up.
To fix this, you need to do one of the following: 1. disable the Channel Central dialog through Options 2. alias the /channel command 3. add a space after the slash in the dialog event
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Feb 2005
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 342 |
Btw, it's not triggering /channel, for me, qwerty. I don't see how it'd trigger: /channel as a command in the MIDDLE of a word and NOT include the "s" as well and throw a "Unknown Command" at you. As such, I can type: /channel in both my mIRC's and get the dialog, and on top of that, the dialog does not bring up the channel dialog when I press the button.
Unless you're telling me that MY copy of mIRC is BUGGED on both MY LAPTOP and MY DESKTOP (VERSIONS 6.17 on laptop, 6.17 on desktop, 6.20 on desktop, 6.21 on desktop).
Edit:
Actually, I think I just realized the problem. I've always used: /dialog -m [title] [name]
THAT is why it's working for me.
I had to stare at the help file, realized I've been using /dialog slightly wrong for a very long time =] I always used the title without spaces in there. (This was back in 2002 btw, I've been on the mIRC scripting scene since back then.)
So of course, because I was doing it that way, I had always used "on *:dialog:the_title:init:*:{}"
Because I invoked the dialog with: /dialog -m the_title DIALOG_NAME.
Last edited by Rand; 01/04/07 06:35 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I ran into the same problem both with and without various switches.
The switches I tried (in all combinations) are -r and -a. When using -r it clears the entire list...Using -a adds the information to the end of the list (creating a duplicate entry with no name associated with it), using -ra clears the list, and puts the entry at the top of the list (what I would consider line 1).
As stated, the Edit box for the ID is supposed to be line 0, which is where I want the information put
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Use /did -c to select a line and it should appear in the top of the box.
|
|
|
|
Joined: Feb 2005
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 342 |
I ran into the same problem both with and without various switches.
The switches I tried (in all combinations) are -r and -a. When using -r it clears the entire list...Using -a adds the information to the end of the list (creating a duplicate entry with no name associated with it), using -ra clears the list, and puts the entry at the top of the list (what I would consider line 1).
As stated, the Edit box for the ID is supposed to be line 0, which is where I want the information put Maybe try: did -i forbid 11 0 $did(forbid,2).seltext Edit: Nevermind, had to re-read what you said in your original post. did -c forbid 11 $did(forbid,2).sel -- would check the line in combobox11, according to what was checked in the combobox2
Last edited by Rand; 01/04/07 06:58 PM.
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
I've just learnt never to argue with anything qwerty says when it comes to mIRC scripting.
He is never wrong. Unless Hammer says so. ^_^
Edit: Or if he's participating in an April Fool! (g)
Mentality/Chris
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Not to Mentality, but to all who have assisted with this problem, solution has been found. Had to replace did $dname 11 0 $did(11,$did(2).sel) with did -c $dname 11 $did(2).sel
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
Oh fine, just leave me out. You're now on my TOP MOST HATED EVER EVER list. Hah at you. 
Mentality/Chris
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
I can't reproduce that behaviour and if you somehow managed to it'd almost certainly be a bug. Slashes are perfectly acceptable in dialog names:
dialog t/x {
size -1 -1 300 300
}
on *:dialog:t/x:init:*:{ echo -a t }
/dialog -m t/x t/x Did you think there was an extra colon before the slash or something? Edit: Edit: Or if he's participating in an April Fool! (g) Haha! Damn Mentality Note: I cannot desribe the joy of refreshing the page and viewing your edit. I can almost see the look of "oh it just dawned on me" look on your face. <3
Last edited by Mentality; 01/04/07 07:26 PM.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
|
|
|
|
Joined: Feb 2005
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 342 |
Haha, actually, April Fools didn't dawn on me (here atleast, I've been doing AF jokes on people all day on IRC ;x)
Back when I gave out quite a chunk of help several months ago, people would always say some wild stuff without actually testing it. (Which I'm sure most people are guilty of every so often)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You're now on my TOP MOST HATED EVER EVER list. Why would I be there...you said it was fine Although, I should've worded that better..I actually meant that it was to all that helped, not just you
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
I just realised that with you and Rand posting in this thread, Russel Brand was here  Omg, the forums are tainted now  * hixxy leaves and never comes back
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
* hixxy leaves and never comes back How many times have I heard that before?  Ohhh bitchy! Russel don't take everything so seriously :P
Mentality/Chris
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
I was expecting that. Doesn't make it hurt any less though.
*cries </3*
|
|
|
|
|