|
Re: Inserting a string into an application
Well, VBscript has a lot in common with VBA, and VBA has the typetext method
by which a string can be inserted directly into a document, so I thought
there might be something similar to that with scripting.
In any case, I didn't understand your message. It was about creating and
saving a txt file, it wasn't about inserting a string of text, which is what
I'm trying to figure out.
To repeat, this is what I do with several of my .vbs files, which I run
using Winkey. A string has already been created, it is transferred to the
Clipboard, and then it is pasted into whatever application is the active
application:
Set oWSH = CreateObject("WScript.Shell")
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
oAutoIt.ClipPut(sText)
oWSH.SendKeys"^v"
I simply wanted to see if there was an even simpler way of doing the same
thing, not involving putting the string in the Clipboard but inserting the
string directly.
Larry |