mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 14
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Jan 2003
Posts: 14
Hi there scripters,

I'm having a bit of a boggle, not sure if this is do-able but I ask; I have this dialog with an output textbox and a preview textbox (which is read only), I was wondering - in the output textbox I want to have codes like "$lol(lol2) $+ yay" without actually turning out as the PreView textbox Should smile

For example,
Output textbox: Hi $nick $+ , 1 USD is $round(6.2312,1) NOK
Preview textbox: Hi Zer0, 1 USD is 6.2 NOK

confused
If that made any sense, any help is appreciated very very much.. smile

*bows* wink

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
The "textboxes" that you are referring to, are called "Editboxes".

When entering text in an editbox, the contents are not evaluated, but treated as plain text. So referring to your first problem where you want to see:

Output textbox: Hi $nick $+ , 1 USD is $round(6.2312,1) NOK

that should already be like that.

Regarding the preview editbox, you should force evaluation on the text, before doing /did -a <dialog> <id> <yourtext>. Example: did -a dialog id $eval(yourtext,2)

That way it will put the evaluated text into the preview editbox. Note that identifiers such as $nick etc. have no value in a dialog, so they won't show up thus be blank. If you try with $me though, or $round, or any identifier which is not related to a certain event, they will be evaluated.

Greets


Gone.
Joined: Jan 2003
Posts: 14
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Jan 2003
Posts: 14
Hehe, sorry for my bad example 05:51 in the morning/night smile Appreciate the help very much.


Link Copied to Clipboard