Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Sendkeys" VB3 does not work in Win 98 - Any ideas?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have used "appactivate" which works in Win 98. "Sendkeys" has only worked once. If I use "Shell", "Appactivate" and "Sendkeys" together on something like calculator, the "Sendkeys" works. If I only use "Appactivate" on an application that is already open along with "sendkeys", the application gains the focus but no key strokes are sent or recieved. Are there any patches or additional files or anything that can help me?
Regards
Centre68
 
hmmm...interesting. While I use VB 3 from time to time I primarily stick to VB 6. But I think I may have an idea of what your problem could be. When you SHELL to a program and then the SHELL command returns that program's "identifier" value, I assume you are using this value when you then go to APPACTIVATE and that works for you, right? Well, in VB 6 you can use this method, or....if you know the actual name of the running application, you can APPACTIVATE it that way as well and use SENDKEYS to send the keystrokes. I have not tested this with VB 3, though you may want to try it.

For example with "MSN Messenger", instead of:
programvar%=SHELL("c:\progra~1\msn\msmsgrie.exe",1)
APPACTIVATE programvar%

if the program is ALREAYDY running, try this instead:
APPACTIVATE "MSN Messenger Service"


hope maybe this helps, but as I said I haven't tested the second syntax in VB 3. I do know that it works in VB 6 however.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top