In order for you to do this kind of thing, you will need to learn how to work with dialogs in mIRC.
/help dialogs
There is a lot of information in that section. Things especially important for you: the section about $did, as your editboxes with the decoration will have to be referenced by $did to store their values to a variable.
The text in editbox 1 would be: $did(<dialogname>,1)
The text in editbox 2 would be: $did(<dialogname>,2)
Setting variables is easy, for global vars use /set.
Now the last part, is when do you set the values to the variables? You'll need to have an event that tells you "ok you should store the values now". This could be upon closing of the dialog, which you can catch with on dialog events, which can also be found in the help file in that section. Small hint, the event you're looking for is "close".
Then when you got all that in place, still remains for you to script the on input event. This event is triggered when you send text through the editbox of where you usually type. The incoming text is filled in $1-, and you will need to use haltdef/halt to stop the default text from showing. Instead you'll need to message something along the lines of: %prefix $1- %suffix
As you can see, I am not scripting this for you because of the following reason:
"Give a man a fish, you have fed him for today.
Teach a man to fish, and you have fed him for a lifetime."
I'm guiding you and dropping clues, but you need to put it together.
Don't forget, the help file contains a lot of information, and if you're smart enough, most of the time the help file is all you really need. If some concepts aren't clear to you, you can always check out some tutorials for example on these sites:
www.mirc.netwww.mircscripts.org