sendkeys PC Software


Welcome, Guest. Please login or register.
Username:   Password:

Hosted in the Cloud RSS

Recent Topics

Gallery Latest


13 Views
0 comment(s)

121 Views
0 comment(s)


122 Views
0 comment(s)

354 Views
0 comment(s)


326 Views
0 comment(s)

519 Views
0 comment(s)

Search The Gallery

User Info

Welcome, Guest. Please login or register.
November 21, 2018, 12:16:40 PM

Login with username, password and session length

Forum
Web
Gallery
Search:         Keywords:

Pages: [1]

sendkeys

Viewing: 0 Members and 1 Guest       Total Views: 1842

Offline 8pla.net Topic starter
United States WWW Posts: 177
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, 03:10:44 AM Logged
My Very Enormous Monster Just Stopped Using Nine

Offline Data
United Kingdom Administrator
Posts: 5275
Rank: Certified

Interesting  Smiley

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

SendKeys Method

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

Offline 8pla.net Topic starter
United States WWW Posts: 177
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, 23:17:46 PM Logged
My Very Enormous Monster Just Stopped Using Nine

Offline DaveMorton
United States WWW Global Moderator
Posts: 2782
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 21, 2015, 00:26:57 AM Logged
Safe, Reliable Insanity, Since 1961!
Chat With Morti!

CAPTCHA4us

Offline Data
United Kingdom Administrator
Posts: 5275
Rank: Certified

Gets my approval  Grin
Posted April 21, 2015, 01:19:53 AM Logged
PC Software
Topic Pages: [1]
Jump to:  

Site Activity
Most Online Today: 190
138 Guests, 1 User
Urania