mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
mIRC 7.07, XP Pro SP3

When I have the channel editbox set up to multiline, if I paste text in, then hit enter, $inpaste returns false, and I can't find a way to tell if multiple lines are being sent/processed.

Also, when multiple lines are in the editbox, and enter is pressed, the lines preceed with / are processed as commands instead of being sent to the server as a message to the active channel/window

To clearify: I have the editbox set to automatic:
Code:
alt+o > display -> options -> "Editbox Lines:" -> Automatic

Then when I paste:
Quote:
This is a test
/echo -a Should this be seen as a command?
/echo -a Am in inpaste? $inpaste

into the editbox, and hit enter the first line is sent to the channel/active window
and the next 2 are echoed out, with $inpaste being $false

Is this how it's supposed to be, or is it a bug. If it's the way it's supposed to be, is there a way to check to see if, with the on input event, multi lines are being sent/interpreted?

edited to clearify


Last edited by FroggieDaFrog; 21/07/10 02:08 PM.

I am SReject
My Stuff
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
From my testing, $inpaste will only return $true if the line is sent automatically (i.e. you paste something with Enter attached). Since that doesn't do anything other than move you to the next line in an automatic editbox setup, it won't return $true. If you paste in something in a single line editbox that doesn't include an Enter and you manually hit Enter, it will also return $false. It has to send it without you pressing any key after pasting it for it to be $true.

Now, whether or not that was the intention or if some functionaliry was overlooked, I'm not sure. I think the purpose was just to see if you hit Enter or not, which is useful when pasting something and you don't want your themes to get in the way (using the $inpaste check along with others like $ctrlenter), so it's probably intentional.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
If you want the text to be processed as plain-text only (preventing any lines from being treated as commands), then press CTRL+ENTER instead of just ENTER. Also $ctrlenter will be set to $true in ON INPUT events when the user does this.

Last edited by drum; 21/07/10 03:54 PM.
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
I know about $ctrlenter...


I am SReject
My Stuff

Link Copied to Clipboard