View Single Post
Old 06-28-2009   #7 (permalink)
Paul Randall


 
 

Re: Inserting a string into an application


"Larry" <larry328NOSPAM@xxxxxx> wrote in message
news:OlLV%23FA%23JHA.4168@xxxxxx
Quote:

>I have various .vbs files in which (using AutoIt's ClipPut method) I put a
> string into the Clipboard and then paste the contents of the Clipboard
> into
> the active application, like this:
>
> Set oWSH = CreateObject("WScript.Shell")
> Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
> oAutoIt.ClipPut(sText)
> oWSH.SendKeys"^v"
>
> Is it possible to insert a string directly into the active application,
> without transferring the string to the Clipboard and then pasting it?
>
> Thanks,
> Larry
I haven't played with AutoIt for a while, so I'm kind of rusty. I always
used the AutoIt control. When I last used AutoIt, I would use it to wait
until some desired window opened, partially by AutoIt's searching for some
specified string displayed in the window. Then I would have AutoIt move the
cursor to the desired spot on the screen and click the desired spot or use
SendKeys to insert the string.

Read AutoIt's online documentation at
http://www.autoitscript.com/autoit3/docs/. One section you will especially
want to read is using the AutoIt Window Info Tool and the rest of the Using
AutoIt section should give you the rest of the info you need.

-Paul Randall


My System SpecsSystem Spec