Copy text from a .TXT file and paste it into an active application.
I have a script that will pull the machine name and place it into a text file on a specified directory on the C:\ drive of a computer. I was wondering is there a way to have that computer name within that text file "copied" and "pasted" into an open application. For example copy "COMPUTERNAME123" to installing program blank entry field. I am trying to avoid using sendkeys.
You can use the Internet Explorer object to access the clipboard. Why bother though, when you can get the machine's name from the environment or WMI? Both are available to VBScript and Powershell (your tags feature both, so we have no clue which it is you're actually going to use).
How you get the text into the application is another question, since we cannot know how the application is "driven". If it has its own object model, there may be a way to get it into a text box (or selected froma drop-down...whatever) but, if not, SendKeys (or PS equivalent) is the only alternative.