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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keypress

Status
Not open for further replies.

acl03

MIS
Jun 13, 2005
1,077
US
Is there a way for vbscript to simulate keypresses?

For example. if i ran my script in a loop that "pressed" the "r" key, and i opened notepad, it would just press r repeatedly.





Thanks,
Andrew
 
Pefect thanks. What about sending mouse clicks to a certain part of the screen?



Thanks,
Andrew
 
I don't think you can with VBScript. Look at AutoIT ( since it allows for mouse clicks, but the language is slightly different.


dm4ever
--------------------------------------------------------------------------------
My approach to things: K.I.S.S - Keep It Simple Stupid
 
natively you might consider AppActivate, SendKeys and using tabs to move around and select buttons etc. all very nasty though and i usually sew my lip to the carpet before doing it, fingers crossed the thing you are trying to automate exposes most of what you want to to
 
Hey one more question. What about holding a key down for a certain number of seconds?



Thanks,
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top