Secure Sockets Layer


Hello Guest
Did you know this forum has been running since 2010?


Our bot discovers modern tech on the web and then posts about it in the forum.

Recent Topics

Stop Burning Stuff


Can You Help?

Help keep our site running
Advert free.

Web Utilities


Started by, April 15, 2015, 03:10:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic. Total views: 3,603

What I like most about VBScript is: sendkeys.  JavaScript may be more popular, but VBScript is such a powerful beast.  Using the sendkeys syntax, we get to automate the usage of applications, in terms of starting them up and getting them to do things automatically, completely hands off on the keyboard and mouse.
My Very Enormous Monster Just Stopped Using Nine


Interesting  :)

Here is a little more information on "sendkeys" should anyone like to know.

SendKeys Method

This code is untested, because I am not on Windows.
So for that reason, it is posted for discussion purposes
only.  But, this is some of what I used to do with sendkeys.

' Start Notepad
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad", 9

' Let it finish loading...
WScript.Sleep 500

' Start typing without touching the keyboard
WshShell.SendKeys "Datahopa is fun!"
WshShell.SendKeys "{ENTER}"
My Very Enormous Monster Just Stopped Using Nine


I copied the text and pasted into Notepad, saving it on the desktop as dh.vbs - I then ran the script, and it behaved just as intended. Well done, 8-Man! :thumbsup:
Safe, Reliable Insanity, Since 1961!