I am trying to use the Enter SendKey and for some reason the only way it actually works - kinda - is if I have it like this which I found from another example:
Do
wshell.SendKeys "{ENTER}"
Loop
Obviously since that's in a loop that's what it's going to do... loop. As a result everything I click on hits Enter until I click another window where it will keep hitting Enter until I end up just restarting my computer.
But if I take it out of the loop it doesn't work at all. Additionally, even if I have it in the loop, though I have tried:
wshell.AppActivate "Internet Explorerer"
I still have to click on the IE window in order for it to actually "press" Enter
How do I use the SendKeys so it's not looping AND you don't have to manually click on the IE window for it to run?
NOTE: I'm only able to use VBScript, not VBA or anything else.
question from:
https://stackoverflow.com/questions/65903951/vbscript-how-to-use-sendkeys-without-it-looping-and-crashing-my-computer 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…