mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2007
Posts: 214
B
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

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Dialog editbox - //clipboard $did(<dialog>,<id>)
mIRC editbox - //clipboard $editbox(<window>)

Joined: Oct 2007
Posts: 214
B
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

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Oct 2007
Posts: 214
B
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

Joined: Sep 2005
Posts: 2,881
H
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
}

Joined: Oct 2007
Posts: 214
B
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

Joined: Sep 2005
Posts: 2,881
H
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
}

Joined: Oct 2007
Posts: 214
B
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.

Link Copied to Clipboard