Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to copy to clipboard?  (Read 6617 times)

0 Members and 1 Guest are viewing this topic.

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
How to copy to clipboard?
« 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?
"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

Salmon Trout

  • Guest
Re: How to copy to clipboard?
« Reply #1 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/


Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #2 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...
"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

Salmon Trout

  • Guest
Re: How to copy to clipboard?
« Reply #3 on: September 11, 2009, 05:56:40 AM »
Please show what you did

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #4 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?

"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

Salmon Trout

  • Guest
Re: How to copy to clipboard?
« Reply #5 on: September 11, 2009, 07:57:21 AM »
Code: [Select]
echo hello | clip

Code: [Select]
set text=My Mother's Brother
echo %text% | clip

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #6 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...


"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

soybean



    Genius
  • The first soybean ever to learn the computer.
  • Thanked: 469
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: How to copy to clipboard?
« Reply #7 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?

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #8 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

"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

soybean



    Genius
  • The first soybean ever to learn the computer.
  • Thanked: 469
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: How to copy to clipboard?
« Reply #9 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?

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #10 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...
"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #11 on: September 11, 2009, 10:11:28 AM »
This still makes no sense at all...
" Anyone who goes to a psychiatrist should have his head examined. "

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #12 on: September 11, 2009, 10:30:53 AM »
I don't have to enter a 15 long code to a game... easy?
"The difference between stupidity and genius is that genius has its limits." - Albert Einstein

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #13 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.
" Anyone who goes to a psychiatrist should have his head examined. "

Frejoh466

    Topic Starter


    Hopeful

    Thanked: 4
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: How to copy to clipboard?
« Reply #14 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
« Last Edit: September 11, 2009, 12:04:41 PM by Frejoh466 »
"The difference between stupidity and genius is that genius has its limits." - Albert Einstein