mIRC Home    About    Download    Register    News    Help

Print Thread
Select *all* text in a channel window? #163100 26/10/06 03:31 PM
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!

Re: Select *all* text in a channel window? #163101 26/10/06 03:43 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: Select *all* text in a channel window? #163102 26/10/06 05:57 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
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)

Re: Select *all* text in a channel window? #163103 26/10/06 08:29 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: Select *all* text in a channel window? #163104 26/10/06 11:17 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
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

Re: Select *all* text in a channel window? #163105 27/10/06 04:25 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
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
Re: Select *all* text in a channel window? #163106 29/10/06 02:53 PM
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