mIRC Homepage

Copy everything in an editbox

Posted By: Buggs2008

Copy everything in an editbox - 04/08/08 11:04 PM

Hello,

I would like to know if its possible how to copy everything in an editbox.

Thanks a bunch,

Cheers,

-J
Posted By: hixxy

Re: Copy everything in an editbox - 04/08/08 11:07 PM

Dialog editbox - //clipboard $did(<dialog>,<id>)
mIRC editbox - //clipboard $editbox(<window>)
Posted By: Buggs2008

Re: Copy everything in an editbox - 04/08/08 11:29 PM

I like your method hixxy, but it only copies the first line in the editbox, is there anyway to make it copy all the lines?

Thanks a bunch!

Cheers,

J
Posted By: argv0

Re: Copy everything in an editbox - 05/08/08 12:25 AM

You'd have to loop line by line with /clipboard -an

That, of course, only works if you're talking about a dialog edit. If the $editbox doesn't return the second line onwards, that may be a bug or may just be a limitation of $editbox.
Posted By: Buggs2008

Re: Copy everything in an editbox - 05/08/08 12:39 AM

Im not exactly the greatest with while loops

do you know what the code would be for this ?

Thanks a bunch,

Cheers,

J
Posted By: hixxy

Re: Copy everything in an editbox - 05/08/08 01:40 PM

For a dialog editbox:

Code:
var %i = 1
while ($did(<dialog>,<id>,%i) != $null) {
  clipboard -an $v1
  inc %i
}
Posted By: Buggs2008

Re: Copy everything in an editbox - 05/08/08 02:15 PM

Works perfectly!,

Thanks very much,

Would it also be possible for a similar code to copy everything in an @Window?

Thanks a bunch

Cheers,

-J
Posted By: hixxy

Re: Copy everything in an editbox - 05/08/08 04:18 PM

Code:
var %i = 1
while ($line(<@window>,%i) != $null) {
  clipboard -an $v1
  inc %i
}
Posted By: Buggs2008

Re: Copy everything in an editbox - 05/08/08 06:51 PM

Works great!

Thanks very much Hixxy

Cheers for all of your brilliance,

-J
© 2020 mIRC Discussion Forums