Computer Hope

Microsoft => Microsoft Windows => Windows XP => Topic started by: Frejoh466 on September 10, 2009, 10:09:33 PM

Title: How to copy to clipboard?
Post by: Frejoh466 on September 10, 2009, 10:09:33 PM
I was trying to make a batch who can copy to clipboard. So I made a search on google but didn't find anything some ppl said it can't be done and some ppl said it can...

So is there a way to make a program to copy to clipboard and then run a .exe?
Title: Re: How to copy to clipboard?
Post by: Salmon Trout on September 11, 2009, 12:58:34 AM
Nothing built-in as a command, but you can use clip.exe from the Windows Server 2003 Resource Kit

Download zip

http://www.petri.co.il/software/clip.zip

Tutorial

http://www.labnol.org/software/tutorials/copy-dos-command-line-output-clipboard-clip-exe/2506/

Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 05:35:35 AM
I have already tryd to do that but it didn't go so well. I got a text to clipboard but it was just a error...
Title: Re: How to copy to clipboard?
Post by: Salmon Trout on September 11, 2009, 05:56:40 AM
Please show what you did
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 06:14:07 AM
I did just remove the bat...

it was like lots of stuff...

Can't you just give me the command to get it to work?

Title: Re: How to copy to clipboard?
Post by: Salmon Trout on September 11, 2009, 07:57:21 AM
Code: [Select]
echo hello | clip

Code: [Select]
set text=My Mother's Brother
echo %text% | clip
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 08:36:19 AM
ok ether the Tutorial is really really bad or my brain doesn't work right...

Thanks for the help, and btw if I want the batch window to start in minimized and quit after it run a .exe file
I have try some commands but it wont work

this is how it look like now
(Dunno how to do the code thingy ::) )

@echo OFF
cls

ping -n 1 -w 70000 1.1.1.1 >nul
start /min D:\***\***.exe

I have try to do

@echo OFF
cls

ping -n 1 -w 70000 1.1.1.1 >nul
start /min D:\***\***.exe X

X = exit, quit, end

I know some minimized commands but they seems not to work whit the ping thing...


Title: Re: How to copy to clipboard?
Post by: soybean on September 11, 2009, 09:32:21 AM
I was trying to make a batch who can copy to clipboard. So I made a search on google but didn't find anything some ppl said it can't be done and some ppl said it can...

So is there a way to make a program to copy to clipboard and then run a .exe?
What is the purpose of this exercise?  Using Ctrl/C will copy anything to the clipboard.  Then, you can paste what's in the clipboard into an open application.  So, why do you need a batch file?
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 09:44:34 AM
well... guess I'm lazy to enter a code... I used to have a auto-login but then I had to wait like 3sec and this will go faster and I'm safer from key logger ;D

Title: Re: How to copy to clipboard?
Post by: soybean on September 11, 2009, 10:01:34 AM
So, you basically want an automatic copying to the clipboard, right?  In other words, this batch file is automatically running when you start your computer.  Is that right?

I can't image a batch file that automatically copies eveything you view, such as web pages, Word documents, etc., into the clipboard.  Is that what you want?  And, if the batch file is automatically copying stuff to the clipboard, what do you do with it once it's in the clipboard?  Is the batch file also suppose to automatically paste the clipboard content into some permanent file?  If that's the case, then I would say that permanent file would grow astronomically and would not be very useful. 

So, I still don't see any practical use of such a batch file.  Can you, or anyone, enlighten me further?
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 10:09:20 AM
So, you basically want an automatic copying to the clipboard, right?  In other words, this batch file is automatically running when you start your computer.  Is that right?

I can't image a batch file that automatically copies eveything you view, such as web pages, Word documents, etc., into the clipboard.  Is that what you want?  And, if the batch file is automatically copying stuff to the clipboard, what do you do with it once it's in the clipboard?  Is the batch file also suppose to automatically paste the clipboard content into some permanent file?  If that's the case, then I would say that permanent file would grow astronomically and would not be very useful. 

So, I still don't see any practical use of such a batch file.  Can you, or anyone, enlighten me further?

emmm... what?

I just want the code to copy to clipboard when I run the game so I can paste the code...
Title: Re: How to copy to clipboard?
Post by: patio on September 11, 2009, 10:11:28 AM
This still makes no sense at all...
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 10:30:53 AM
I don't have to enter a 15 long code to a game... easy?
Title: Re: How to copy to clipboard?
Post by: patio on September 11, 2009, 10:59:11 AM
We don't even know what game this or what the heck the code is for...
You haven't supplied many details on what it is you are trying to do.
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 11, 2009, 11:48:02 AM
Code: [Select]
echo off
cls

set text=***********
echo %text% | clip

"D:\CS\CS.exe"



happy?

Edit:
If you mean
ok ether the Tutorial is really really bad or my brain doesn't work right...

Thanks for the help, and btw if I want the batch window to start in minimized and quit after it run a .exe file
I have try some commands but it wont work

this is how it look like now
(Dunno how to do the code thingy ::) )

@echo OFF
cls

ping -n 1 -w 70000 1.1.1.1 >nul
start /min D:\***\***.exe

I have try to do

@echo OFF
cls

ping -n 1 -w 70000 1.1.1.1 >nul
start /min D:\***\***.exe X

X = exit, quit, end

I know some minimized commands but they seems not to work whit the ping thing...



I still have the window after I run the .exe

but I know how to copy to clipboard

Code: [Select]
echo hello | clip

Code: [Select]
set text=My Mother's Brother
echo %text% | clip
Title: Re: How to copy to clipboard?
Post by: Mulreay on September 12, 2009, 07:31:17 PM
and I'm safer from key logger ;D

You have to have either horrible friends or serious enemies for someone to keylog your computer.  ::)
Title: Re: How to copy to clipboard?
Post by: Frejoh466 on September 13, 2009, 04:03:17 AM
You have to have either horrible friends or serious enemies for someone to keylog your computer.  ::)

well one of my acc on a game got hacked and I lost 20$ so I got enemy's  >:(