mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2004
Posts: 11
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2004
Posts: 11
Is it possible to have a default text already filled in the dialog?

Background: Everytime I connect I'd like to be asked for a nick. Usually I go with the standard one but sometimes (depending on mood) I choose another one.

So it would be convenient to have this dialog pop up before connection and already filled in with my default nick.
Is that possible without programming my own DLL?

killemall

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
If I understood right, yes it is possible smile

You can fill in everything: buttons, check boxes, list boxes, edit boxes and normal text! It usually goes like this:
did -ra <name> <id> <text>


The -a will fill the ID with the text you determine, so you kinda need that one for puting text. smile The -r switch, however, means that it will first erase all data in the ID and then write what you want. If you would like to add something, do not use the -r; if you want to just fill it and erase the previous text, then do use it smile

In your case you could use the On Start event, open the dialog and then use the On Dialog > init event to fill the listbox/text/whatever..

I hope this was what you were looking for smile
Zyzzyx

Edit: MonoSex has got a point too smile

Last edited by Zyzzyx26; 12/09/04 09:34 PM.

"All we are saying is give peace a chance" -- John Lennon
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
Sure, use $input instead of $?, like $input(prompt,e,title,text).
/help $input

Joined: Jun 2004
Posts: 291
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
i dont think its possible to use
the $?="input" to add text in but this dialog
would work:
dialog dialogname {
title "Dialog"
size -1 -1 109 41
option dbu
edit "Edit", 1, 7 12 94 10
button "Ok", 2, 7 24 33 12
button "Cancel", 3, 67 24 33 13
text " Enter A Nick Name To Use ....", 4, 8 3 92 8
}
on *:CONNECT:{
dialog -m dialogname dialogname
}
on *:DIALOG:dialogname:init:0:{
did -ra $dname 1 $me
}
on *:DIALOG:dialogname:SCLICK:2:{
nick $did(1)
dialog -c $dname
}
on *:DIALOG:dialogname:SCLICK:3:{
dialog -c $dname
}

EDIT: didnt see the other 2 posts

Last edited by whatsthedillio; 12/09/04 09:40 PM.
Joined: Sep 2004
Posts: 11
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2004
Posts: 11
Thanx everybody for the help!!

I'm sure all solutions would work, whereas MonoSex's way of doing it seem to be the easiest.

But it is good to know that I can create dialogs with the /dialog command and that there is a command like /did to modifiy values of dialog controls.

So, thanx guys you're great!

killemall


Link Copied to Clipboard