Hi,
I am afraid I may well be missing the obvious here, but here goes:
I have created a webpage which I intend to use purely for me, and from my local directory, and this webpage uses forms to create a dos command, which is then copied to the clipboard. I wondered if it is possible to write a batch file which would take the contents of the clipboard and use it as a command. Any suggestions?
Ed
Using command from clipboard in batch file
Moderator: DosItHelp
Re: Using command from clipboard in batch file
On Vista/Win7 is a tool named clip.exe which is able to copy something to the clipboard. But afaik there is no option to paste from clipboard.
Maybe the SendKeys Method of VBScript could be a possibility for you to emulate Ctrl + V.
Regards
aGerman
Maybe the SendKeys Method of VBScript could be a possibility for you to emulate Ctrl + V.
Regards
aGerman
Re: Using command from clipboard in batch file
Thanks for answering,
how would it be possible to execute commands in the command prompt using VB?
how would it be possible to execute commands in the command prompt using VB?
Re: Using command from clipboard in batch file
Well, the example on the URL link shows how to do.
<obj>.Run "cmd.exe" can open a command prompt
<obj>.SendKeys "what ever" will emulate the keyboard
The only thing you have to know is that [Ctrl] + [V] doesn't work for a command prompt. You would need [Alt] + [Space], [E], [P].
Regards
aGerman
<obj>.Run "cmd.exe" can open a command prompt
<obj>.SendKeys "what ever" will emulate the keyboard
The only thing you have to know is that [Ctrl] + [V] doesn't work for a command prompt. You would need [Alt] + [Space], [E], [P].
Regards
aGerman
Re: Using command from clipboard in batch file
Use getClip from http://vb.mvps.org/tools/ConClip/Ed4571 wrote:take the contents of the clipboard