mIRC Homepage

/clipboard feature.

Posted By: Jigsy

/clipboard feature. - 05/11/07 12:05 AM

I've seen a couple of previous posts that ... sort of linger on this idea. (I think.)

But the ability to save text from the clipboard and load text into the clipboard would be nice.

E.g.

/clipboard -s <P:\ath\to\file.ext>
/clipboard -l <P:\ath\to\file.ext>
Posted By: Trashlord_

Re: /clipboard feature. - 05/11/07 12:09 AM

Code:
alias saveclip {
var %i = 0, %x = $cb(0)
if (!%x) { return }
while (%i < %x) {
inc %i
write $1 $cb(%i)
}
echo -a *** Saved clipboard data to $1
}

alias loadclip {
if (!$isfile($1)) { return }
var %i = 0, %x = $lines($1)
while (%i < %x) {
inc %i
clipboard -a $read($1,%i)
}
echo -a *** Loaded text to clipboard from file $1
}

Posted By: Jigsy

Re: /clipboard feature. - 05/11/07 12:12 AM

I know it can be scripted, I just meant overall.
Posted By: Riamus2

Re: /clipboard feature. - 05/11/07 12:50 AM

A way to save it to a file would probably be good. Loading to the clipboard doesn't really offer anything that I can see.

The problem I see saving from the clipboard would be when something other than text is on the clipboard. I'm not sure what would be involved in making mIRC properly save every possible thing that can be on the clipboard.
Posted By: Jigsy

Re: /clipboard feature. - 05/11/07 01:05 AM

Reloading the clipboard could be useful if you need something else that'll clear, then add data to your clipboard cache. (For like temp. purposes.)
Posted By: deegee

Re: /clipboard feature. - 05/11/07 02:40 AM

Originally Posted By: Jigsy
Reloading the clipboard could be useful if you need something else that'll clear, then add data to your clipboard cache. (For like temp. purposes.)

That's exactly why I suggested this. wink
Posted By: Jigsy

Re: /clipboard feature. - 05/11/07 03:26 AM

I said it loosly followed what others said. :P

Quote:

Note though that I'm not talking about saving to image/text/whatever file
Posted By: deegee

Re: /clipboard feature. - 05/11/07 03:52 AM

Originally Posted By: Jigsy
I said it loosly followed what others said. :P

Originally Posted By: deegee

Note though that I'm not talking about saving to image/text/whatever file

Yep, 'cause if it's just the raw clp data it doesn't matter what is in the clipboard, it'll be preserved and re-instated.

Text
File lists (Windows copy/cut/paste purposes)
Images (or parts of)
...and so on

Plus no line length issues...
Posted By: Om3n

Re: /clipboard feature. - 05/11/07 07:12 AM

Originally Posted By: Riamus2
Loading to the clipboard doesn't really offer anything that I can see.


There are a number of scripts (dialogs) that sort of 'compile' a complex command or similar based on options selected and/or information input into the dialog. A little 'copy to clipboard' is always nice.

'Loading' the clipboard (i assume dumping data into it) is easy enough to script though /clipboard on its own clears it then a loop of /clipboard -an calls to add each line...
© 2022 mIRC Discussion Forums