GolfBag said:
I want to use Access to open a shell to another program
and I can do that. Now I want to use send keys which will
work on one instance, but I really need to do a for I = 10
kind of thing so I can get it to send the series of keys
10 times. It won't work; does anybody know if this is
possible? Any help would be appreciated.
The problem with the he above approach is that it is so un-reliable..that
you can't trust this. In other words...sendkeys is not very useful. Hitting
a mouse..bumping a key while the process runs..accident switching to another
program that will then grab the keys strokes...sending keystroke too fast to
the program..etc .etc etc. Any one of these things happens..and your code
will fail.
So, in some cases you might get the keypress idea to work..but it is just so
full of so many things that can go wrong, that the end result is something
that is so un-reliable and so buggy as to be useless. (besides..you likely
do want to be viewed as creating buggy and un-reliable software..do you?).
So, I would find out if you can create some batch file, or can automate the
other application. (so, for example..when we launch word...you can insert
characters into a document..but you use "automation" and not sendkeys to do
this. I would find out of the other application you are using can be
automated (most good commercial windows programs can be automated).
SendKeys should be your last resort after you eliminated every other
possible approach..(and, have to realize that sendkeys is not reliable).