Craig said:
I Know that this has been asked before. My question is why it will not
pop
up on one computer but will on another. The same actions being performed.
Any input will be helpful.
Thanks Craig
You'll have to give a few more details as to what kind of add in it, and
exactly in which environment and situation you're talking about here.
However if you're asking as to why using send keys causes inconsistent
behavior from computer to computer, then I'm afraid you simply learning what
everybody here been saying for about ten years that you should try and avoid
sendkeys at all cost.
If you want to try a simple experiment, try double clicking on your word
icon on your desktop. **Right** after you click on the icon, slap your hand
on they keyboard a few times to whack several keys (you have do this fast).
Sometimes you'll see the keys get typed into the word document, sometimes
you'll see the keys processed by your desktop (as you press a key, the icon
on the desktop that starts with the letter that you just pressed Debts
highlighted. In other cases you'll see the key presses going to an open copy
of Excel, or anything else open That happens to be lucky enough to
accidentally get the focus in this process of what we're waiting for word to
load.
In other words you're simply spewing out keys, and hoping on a wing and
prayer whatever window and application is loaded will be lucky enough to
receive those keystrokes.
You're very likely seeing different behavior on two computers because
perhaps on the one computer the program is program much slower, and
therefore the key presses are missed or caught by other applications
running, or simply that the program has not finished loading as of yet, and
it's too soon for keystrokes to be processed (you can well see this behavior
if you try my word loading experiment above, often you'll see that word does
not get the few keystrokes that you slapped on the keyboard, you simply have
to wait until word is actually loaded, and then pressing keystrokes will
work.
You can still see many problems even if you wait until word is loaded, since
for example if you bump the mouse or something then whichever application
happens to have the focus temporarily will now be receiving those
keystrokes. Thus, it is quite often that you see different behaviors for
using sendkeys on different computers because the loading speed of different
applications can vary by quite a bit, and that your right back to that
problem of not knowing what program will receive those keystrokes, or as
mentioned the most common problem who is the program is loading slower, and
the program is not ready to receive keystrokes yet.
So to answer your question is, sendkeys is an inherently unreliable process
in which you have little, if any control over which application just happens
by a fluke of nature to be active and ready to receive those keystrokes.