sendkeys - PC Software

Welcome, Guest. Please login or register.
User ID   P-Word

Secure Sockets Layer Unlimited Web Hosting RSS
Recent Topics
Gallery Latest

137 Views
0 comment(s)

218 Views
0 comment(s)


199 Views
0 comment(s)

519 Views
0 comment(s)


451 Views
0 comment(s)

503 Views
0 comment(s)

Search The Gallery
Welcome, Guest. Please login or register.
January 27, 2021, 09:23:07 AM

Login with username, password and session length
Ai Specific Links

Search:         Keywords:

Pages: [1]
sendkeys
Viewing: 0 Members and 1 Guest       Total Views: 2494

Offline 8pla.net Topic starter
United States WWW Posts: 210
Rank: Apprentice Adept

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.

Posted April 15, 2015, 02:10:44 AM Logged
My Very Enormous Monster Just Stopped Using Nine

Offline Data
United Kingdom Administrator
Posts: 8094
Rank: Certified

Interesting  Smiley

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

SendKeys Method


Posted April 15, 2015, 09:31:44 AM Logged

Offline 8pla.net Topic starter
United States WWW Posts: 210
Rank: Apprentice Adept

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.

Code:
' 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}"

Posted April 20, 2015, 22:17:46 PM Logged
My Very Enormous Monster Just Stopped Using Nine

Offline DaveMorton
United States WWW Global Moderator
Posts: 3413
Rank: Certified
Comfort the Disturbed! Disturb the Comfortable!

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

Posted April 20, 2015, 23:26:57 PM Logged
Safe, Reliable Insanity, Since 1961!

Offline Data
United Kingdom Administrator
Posts: 8094
Rank: Certified

Gets my approval  Grin

Posted April 21, 2015, 00:19:53 AM Logged
PC Software
Topic Pages: [1]
Find this topic interesting? Register to join in.
Jump to:  

Site Activity
Most Online Today: 126
96 Guests, 1 User
DataBot
Site Activity
Most Online Today: 126
96 Guests, 1 User
DataBot

fast-registration