Click here to Skip to main content
15,878,231 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i am trying to make a code in vbs that types something and then clicks on a specific place, it types what i say but doesnt click on the place. here's the code
Dim x
x=1
Do Until x=21
set wshshell = wscript.CreateObject("wScript.Shell")
 wscript.sleep 10000
wshshell.sendkeys ";p"
 wscript.sleep 300
wshshell.sendkeys "{ENTER}"
 wscript.sleep 300
wshshell.sendkeys "{CLICK, LEFT, 415 545}"
 wscript.sleep 300
x=x+1
Loop


What I have tried:

i tried to google its solution but i am confused
Posted
Updated 8-Nov-22 0:40am
Comments
Dave Kreskowiak 8-Nov-22 9:34am    
"CLICK", "LEFT", and a couple numbers is not a valid SendKeys sequence. I'm wondering where you got that from.

1 solution

Sendkeys does not support the Click command, see: SendKeys Method | Microsoft Learn[^]
You could use one of these tools instead: gui-automation-tools-for-windows[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900