mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2006
Posts: 2
A
Anna_c Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Oct 2006
Posts: 2
Hi,

is it possible to select (and copy it afterwards to the clipboard) all text in a channel window?
I tried several shortcuts und couldn't find a solution. It's only possible to select the visible text.

How do I do this? Thanks alot for your help!

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, this doesn't copy it to the clipboard, but you can use /savebuf to save everything to a file...

//savebuf $active filename.txt

Note that you'll need both /'s for it to work properly from the command line.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
To expand on Riamus' answer...

The following code should be placed in your remotes editor (alt+R)

Code:

menu channel {
  copy window to clipboard:catch
}
alias catch {
  savebuf $active caught.txt
  clipboard $read(caught.txt,1)
  var %i $lines(caught.txt)
  var %o 1 
  while %o < %i {
    inc %o
    clipboard -an
    clipboard -a $read(caught.txt,%o)
  }
  remove caught.txt
}


to use it, right click in the window and look for the menu(or type /catch)

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Interesting. I didn't realize there was a clipboard command. I'll have to look into that. Just a note on the script -- it would probably make sense to put a silencing dot before remove so it appears as though the window is directly copied to the clipboard rather than seeing the file being removed every time.

.remove caught.txt


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
why use a file at all?!?!?!?!

Code:
menu channel {
  copy window to clipboard:catch
}
alias catch { 
  if ($mouse.key & 2) { clipboard | var %m = $line($active,0), %i = 1 | while (%i <= %m) { clipboard -an $line($active,%i)         | inc %i } }
  else                { clipboard | var %m = $line($active,0), %i = 1 | while (%i <= %m) { clipboard -an $strip($line($active,%i)) | inc %i } }
}


* covers ctrl key up or down to copy text or text and ctrl codes

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
yeah, i added the remove as an afterthought that savebuf would append rather than write -c it. If i was testing it i would have noticed that, lol.

btk


billythekid
Joined: Oct 2006
Posts: 2
A
Anna_c Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Oct 2006
Posts: 2
Thanks alot to you all laugh


Link Copied to Clipboard