Welcome Guest.   Make a donation to an author on the site October 31, 2014, 02:51:34 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Redirect screen output to clipboard  (Read 15150 times)
blackcat
Participant
*
Posts: 62

View Profile Give some DonationCredits to this forum member
« on: November 13, 2008, 07:00:08 AM »

usually we redirect output on command prompt screen to file eg dir /b /s >c:\filelist.txt but is there way to redirect those output directly to clipboard?
Logged
jgpaiva
Global Moderator
*****
Posts: 4,711



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: November 13, 2008, 07:49:59 AM »

There's an utility that is used for AutoHotkey that puts what it reads to the clipboard. So, if you redirect the output to it, you should be good to go Wink
Get it here.
Logged

ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: November 13, 2008, 09:55:02 AM »

I wrote a small command line app in C++ I use all the time to do this.. If you are interested I could throw it up on my website..
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
AbteriX
Charter Honorary Member
***
Posts: 1,050


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: November 13, 2008, 02:34:21 PM »

I use cb often

dir /b /s |cb

There is a 512k limit. But this is no problem since i use it for small issues only and would redirect large amounts to file.

I would like to test ChalkTraumas as well  tongue
Logged

Greetings, Stefan.
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: November 13, 2008, 02:39:11 PM »

Ok... I'll get something up on the site and post here when I do, since there is an interest.
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: November 13, 2008, 10:44:05 PM »

Ok.. here it is:

ClipCopy

Pretty simple to use:

* This will copy the output from dir /b to clipboard
dir /b | clipcopy

* This will do the same but echo out to stdout at the same time ( like tee )
dir /b | clipcopy -e

* This will dump the text contents of the clipboard to stdout
clipcopy -g

* So you can dump the clipboard contents to a file like this

clipcopy -g > clipboard.txt

* You can also put strings directly on the clipboard like this

clipcopy this is going to the clipboard

Well, that is about all it does, you can type clipcopy -h for usage..

I compiled it with VS 2005 SP1 so you probably need the runtime if you don't already have it, if you do need it you can get it HERE

~enjoy  Thmbsup
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
AbteriX
Charter Honorary Member
***
Posts: 1,050


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: November 14, 2008, 10:03:13 AM »

Thanks ChalkTrauma this works fantastic  Thmbsup
I was able to redirect and paste to editor up to 75.000 lines (on an simple test) .... cb give me 1.000 - 3.000 lines only (512k limit)
(very limited comparison because i compare output lines only instead of real char-count, but that's enough for me to see how it works)

Thank you very much for sharing  Kiss  Thmbsup

BTW would'nt it be a good idea to distribute your exe with your-last-post-content as ClipCopy.txt ?
Logged

Greetings, Stefan.
blackcat
Participant
*
Posts: 62

View Profile Give some DonationCredits to this forum member
« Reply #7 on: November 14, 2008, 07:47:47 PM »

Chalk, thanks for sharing  thumbs up
Logged
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: November 14, 2008, 09:23:38 PM »

No problem at all, I've got a bunch of these little command line apps lying around that do really specific things, glad someone else got some use out of one of them  cheesy
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
blackcat
Participant
*
Posts: 62

View Profile Give some DonationCredits to this forum member
« Reply #9 on: April 08, 2009, 08:32:54 AM »

ChalkTrauma, how about showing on screen at the same time as redirecting to a file?
Logged
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: April 08, 2009, 08:42:48 AM »

I would use something like tee to do this:

http://unxutils.sourceforge.net/


so. something like the following command line:

dir /b | clipcopy -e | tee dirlist.txt

 Thmbsup
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
lanux128
Global Moderator
*****
Posts: 6,120



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: September 05, 2009, 05:58:27 PM »

i use this quite often but can't remember where i got this from, until today. smiley this is a very good tool, thanks ChalkTrauma! Thmbsup
Logged

ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: September 05, 2009, 08:43:48 PM »

I'm glad you find it useful, thanks for the reply  Thmbsup
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
lanux128
Global Moderator
*****
Posts: 6,120



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: September 05, 2009, 09:00:03 PM »

so what other command line gems have you written? please do share with us.. smiley
Logged

ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: September 06, 2009, 12:06:42 PM »

I guess at last count I have over 50 of these things I wrote to solve this problem or that, they are in various states of completeness. Some have wacky command line params that do odd things if you combine them, that I have never fixed or documented, and some continue to evolve to help me do things in my 'day job'..

I guess I really should run through them and see whats there.. Maybe this is the little push I need to package some of these up for general use..
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
lanux128
Global Moderator
*****
Posts: 6,120



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: September 06, 2009, 06:01:38 PM »

I guess I really should run through them and see whats there.. Maybe this is the little push I need to package some of these up for general use..

i'm glad that i was able to provide the motivation.. Grin
Logged

ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: September 08, 2009, 02:03:41 PM »

I've started work on this and I'm currently cleaning up docs and code and putting together a web page..

I'm going to package it all up into one self-extracting archive with docs and put it up on my site. I'll get the stuff that is closer to being complete out first and the other stuff will come later..

I'll start a thread over in 'Other Programs' rather than hijack this one, when things are ready...
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
lanux128
Global Moderator
*****
Posts: 6,120



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: September 09, 2009, 10:47:54 PM »

thanks for taking the time to do this. your efforts are much appreciated. smiley
Logged

ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: September 09, 2009, 10:52:26 PM »

Well I'm about 4 apps in, and have found a few bugs along the way, I think I'll shoot for 10 and then release it and then start on the next batch..
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
mouser
First Author
Administrator
*****
Posts: 33,611



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: September 09, 2009, 11:32:39 PM »

don't burn yourself out before this year's NANY 2010 event!
Logged
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: September 10, 2009, 10:17:30 AM »

me... burnout... never..  cheesy
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: October 28, 2009, 07:35:48 PM »

Ok guys and gals.. almost ready for a release, just tidying up a few loose ends.. I really don't like releasing anything 0.5f done if I don't absolutely have to, so getting this stuff ready took a while and I'm a few days away from having it all ready, but the page is up on my site if you want to have a look.

I'll be moving the rest of the conversation about these tools over to the Other Programs forum once the download is up there..

Again, thanks for the interest  thumbs up
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
Ehtyar
Supporting Member
**
Posts: 1,236



That News Guy

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: October 28, 2009, 08:08:44 PM »

I really don't like releasing anything 0.5f done
Epic nerd-humor creds there, I had to think for a second wtf you were talking about Thmbsup

Ehtyar.
Logged
ChalkTrauma
Honorary Member
**
Posts: 116


::41554D::

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #23 on: October 28, 2009, 09:16:23 PM »

w00t! +1 on the geek points  cheesy
Logged

'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
skwire
Global Moderator
*****
Posts: 4,119



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #24 on: October 28, 2009, 11:29:39 PM »

the page is up on my site if you want to have a look.

Fantastic work.  Thanks for sharing.
Logged

Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.065s | Server load: 0.09 ]