mIRC Home    About    Download    Register    News    Help

Print Thread
#246140 25/05/14 12:37 AM
Joined: May 2014
Posts: 23
X
x9J3H8x Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2014
Posts: 23
Hello,
Having selected Tools-->Options--> Display-->Options--> Editbox lines: Single. Next if I copy and paste a text in a Channel or Private , then the text is directly appeared in the Channel or Private without me pressing key “Enter’’.
Could anyone tell me why this happens and if it possible to be disabled?

Thanks for your time.

B
blessing
blessing
B
I believe that happens because text you copied has unseen linebreak.
set editbox lines to automatic would disable it, no?

Joined: May 2014
Posts: 23
X
x9J3H8x Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2014
Posts: 23
Yes I have already tried the two options (Multiple & Automatic) but I prefer the choice Single because by using this choice a have a thin box for text message in which I can write down my text kai then I push Enter so my text is appeared to Channel or Private.
My question was If there is a way that could allow me to disable the aytomatic Enter (so that when I copy and paste a text won’t automatically pressed the Enter)

Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
There's an option under Other > Confirm to set a warning when pasting more than X number of lines. I suppose you want that set to 1.

B
blessing
blessing
B
I think you need script for that.
Here is how i do it. Hope this is what you want.

Code:
on *:INPUT:*:{
  if $inpaste { 
    var %i 1 | while $cb(%i) { 
      tokenize 32 $1- $v1
      inc %i 
    }
    editbox $active $1- 
    haltdef 
  }
}

Joined: May 2014
Posts: 23
X
x9J3H8x Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2014
Posts: 23
Thank you, script was the perfect solution

Last edited by x9J3H8x; 26/05/14 06:04 PM.
Joined: May 2014
Posts: 23
X
x9J3H8x Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2014
Posts: 23
The above script is what I was looking for, ala I noticed a flaw. When I copy-paste one line is OK. When I copy paste tow lines appear three lines. I think there is a cape flaw in the above script.
Thank you

Joined: Jul 2006
Posts: 4,037
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,037
If you use the 'single' method for your editbox, you cannot display more than one line, the script simply concatenates all the lines into one big line.
The problem is that if you don't want the lines to be sent and if they cannot be seen in the editbox, what should it do? Doing what the script is doing is not really a good idea, what you want is really the 'automatic' mode. In fact, the automatic feature does allow you to get a single line editbox just like in 'single' mode, it's just an improved version, it only expands to welcome more lines if needed.

Last edited by Wims; 23/07/14 12:39 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: May 2014
Posts: 23
X
x9J3H8x Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2014
Posts: 23
Just so it is, my own was the mistake in the description of the problem. Having chosen one line and by copy-paste appears OK. Ala when selected two lines and I do copy-paste display one line but one line includes text, like I have chosen three lines while I as I told you, I chose two lines, and not three.

Joined: May 2014
Posts: 23
X
x9J3H8x Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2014
Posts: 23

I think I found the solution. At least as many tests I was working correctly, however I'll give you again the script with the changes for those who are interested in this topic:

Code:
on *:INPUT:*:{
  if $inpaste { 
    var %i 1 | while $cb(%i) { 
      tokenize 32 $1- $v1
      inc %i 
    }
    editbox $active $3- 
    haltdef 
  }
}



Link Copied to Clipboard