mIRC Home    About    Download    Register    News    Help

Print Thread
sending messages using editbox #260884
30/06/17 10:03 AM
30/06/17 10:03 AM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
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?

Re: sending messages using editbox [Re: Protopia] #260885
30/06/17 10:06 AM
30/06/17 10:06 AM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
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

Last edited by Protopia; 30/06/17 10:07 AM.