mIRC Home    About    Download    Register    News    Help

Print Thread
Copy everything in an editbox #203009 04/08/08 11:04 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

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

Thanks a bunch,

Cheers,

-J

Re: Copy everything in an editbox [Re: Buggs2008] #203010 04/08/08 11:07 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Dialog editbox - //clipboard $did(<dialog>,<id>)
mIRC editbox - //clipboard $editbox(<window>)

Re: Copy everything in an editbox [Re: Buggs2008] #203013 04/08/08 11:29 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
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

Re: Copy everything in an editbox [Re: Buggs2008] #203017 05/08/08 12:25 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Copy everything in an editbox [Re: Buggs2008] #203018 05/08/08 12:39 AM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Im not exactly the greatest with while loops

do you know what the code would be for this ?

Thanks a bunch,

Cheers,

J

Re: Copy everything in an editbox [Re: Buggs2008] #203028 05/08/08 01:40 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
For a dialog editbox:

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

Re: Copy everything in an editbox [Re: Buggs2008] #203034 05/08/08 02:15 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
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

Re: Copy everything in an editbox [Re: Buggs2008] #203040 05/08/08 04:18 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
var %i = 1
while ($line(<@window>,%i) != $null) {
  clipboard -an $v1
  inc %i
}

Re: Copy everything in an editbox [Re: Buggs2008] #203047 05/08/08 06:51 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Works great!

Thanks very much Hixxy

Cheers for all of your brilliance,

-J

Last edited by Buggs2008; 05/08/08 06:51 PM.