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


 
 

Re: Inserting a string into an application

VBA comes in many flavors, a different one for each of the applications
within the Microsoft Office Suite. These VBA versions have special
knowledge of the application, but can't necessarily do these special things
to other applications. VBScript also does not have this ability. It can
only do a generic SendKeys. AutoIt can look for a specific control within a
window, and perhaps cause VBScript's SendKeys to send the keystrokes to the
spot you want. Lots of windows contain multiple controls, and VBScript
isn't smart enough to send them to the proper control.

Note that SendKeys is dumb, in that it just blindly sends keystrokes to
whatever application is active. If an antivirus or other service pops up a
message while VBScript is sending a group of keystrokes, the message will
likely become the active window and get some or all of the keystrokes.

-Paul Randall

"Larry" <larry328NOSPAM@xxxxxx> wrote in message
news:eqKsnFG%23JHA.4900@xxxxxx
Quote:

> What I'm doing has nothing to do with looking for any particular window.
> The
> window I want to paste or insert into is already active. Think of this as
> the equivalent of pressing Ctrl+V to paste the Clipboard contents into the
> active window, except that what I'm doing here is pasting or inserting a
> string that's been created in a .vbs file.
>
>
>

My System SpecsSystem Spec