mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2004
Posts: 59
L
Babel fish
OP Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
I am trying to get this dialog to work correctly

dialog buddy_add {
title "Add Buddy"
size -1 -1 86 33
option dbu
edit "", 1, 4 3 77 13
button "Ok", 2, 23 18 37 12, Ok
}

ON *:DIALOG:buddy_add:sclick:2: {
if ($server == $null ) { echo -a 4ERROR: YOU ARE NOT CONNECTED TO A CR SERVER }
else {
echo -a /NS BUDDY ADD $did(buddy_add,1).text
dialog -m buddy_addnote buddy_addnote
}
}

Everything works ok but the if ($server == $null) I am not connected to a server but the dialog will move to the else { Statment.

I would be greatful for any help.
grin

Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
use the -h switch when opening the dialog to make it work with the active server ;D


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Jul 2004
Posts: 59
L
Babel fish
OP Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
Sorry Got it fixed the dialog -h wasnt what I was looking for. Odly although I dont know why, once I closed mIRC and re opened it eveything worked just fine as I coded it.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
My guess is lack of windows resources, I had the same problem with your code. I closed other programs, re-opened mIRC and it worked fine. I get alot of strange activity when I'm running low on resources.

I lose 50% of the controls in the Options dialog, or the options dialog wont open at all. smile

-Andy


Link Copied to Clipboard