mIRC Homepage
Posted By: Protopia sending messages using editbox - 30/06/17 10:03 AM
I want to send messages using /editbox rather than /msg (because I want to allow "on input" events to happen).

"/editbox -n My text" works fine.

Now I want to save existing unsent input and restore it afterwards using:

Code:
var %existing = $editbox(#chan)
editbox -n #chan My text
editbox #chan %existing


But this doesn't work - probably a timing issue. Or perhaps an issue with getting "on input" (which doesn't halt the input) to run after the "editbox -n" whilst this script is still running.

Anyone got any ideas? Use of a timer perhaps to reload the editbox?
Posted By: Protopia Re: sending messages using editbox - 30/06/17 10:06 AM
Originally Posted By: Protopia
Use of a timer perhaps to reload the editbox?

Using a timer worked:

Code:
var %existing = $editbox(#chan)
editbox -n #chan My text
.timer -m 1 1 editbox #chan %existing
© mIRC Discussion Forums