Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

vbscript - Possible for VBS to sendkeys while a full screen application is above it?

Sorry if this seems like a dumb question but im curious to see if this would work?

So my plan was to create a .vbs script to send keys to go to a website, but my plan was to have a blank black screen over top of it so you couldnt see the process. Obviously it would not be hard to make the full black screen (it would be done in a different language, most likely an exe file) but then I completely forgot... would it even be possible? I tested it out with other full screen programs and obviously it sent the "sendkeys" command to the program that was in front.

Still confused? Here is an example

Set WshShell = CreateObject("WScript.shell") for i = 0 to 50 WshShell.SendKeys(chr(175)) next Process.Start("CMD", "/C start chrome.exe http://www.bing.com")

WScript.Sleep 2000

WshShell.SendKeys "this is an example of text being put into the search bar"

So my question is, would it be possible to have a fullscreen application open while this command runs in the background? it could be any fullscreen application, just anything to "hide" or cover this process.

Or would it even be possible to create a fullscreen program specifically to cover this?

Thank you for reading!

question from:https://stackoverflow.com/questions/65846901/possible-for-vbs-to-sendkeys-while-a-full-screen-application-is-above-it

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...