mIRC Home    About    Download    Register    News    Help

Topic Options
#97444 - 12/09/04 10:20 PM Default text for dialog ($?="...")
killemall_ Offline
Pikka bird

Registered: 09/09/04
Posts: 11
Loc: Switzerland
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

Top
#97445 - 12/09/04 10:31 PM Re: Default text for dialog ($?="...")
Zyzzyx26 Offline
Hoopy frood

Registered: 15/02/04
Posts: 714
Loc: Brasil
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


Edited by Zyzzyx26 (12/09/04 10:34 PM)
_________________________
"All we are saying is give peace a chance" -- John Lennon

Top
#97446 - 12/09/04 10:31 PM Re: Default text for dialog ($?="...")
MonoSex Offline
Fjord artisan

Registered: 09/12/02
Posts: 395
Loc: Ireland
Sure, use $input instead of $?, like $input(prompt,e,title,text).
/help $input

Top
#97447 - 12/09/04 10:36 PM Re: Default text for dialog ($?="...")
whatsthedillio Offline
Fjord artisan

Registered: 10/06/04
Posts: 291
Loc: Uk
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


Edited by whatsthedillio (12/09/04 10:40 PM)

Top
#97448 - 13/09/04 07:22 AM Re: Default text for dialog ($?="...")
killemall_ Offline
Pikka bird

Registered: 09/09/04
Posts: 11
Loc: Switzerland
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

Top