Results 1 to 2 of 2

Thread: sending keystrokes in VBScript

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    RTP, NC
    Posts
    3

    Exclamation

    Does anyone out there know of a command similar to SendKeys in VB for use in VBScript? I am trying to open a Dos window from VBScript code and send it some commands to automate a service. If anyone has any tips, i would appreciate it.

    Thanks

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Ahh, I see what you mean now

    You don't need sendkeys, you can use the windows script host object model to send keys to dos, all using VBScript!

    Code:
    dim objScripting
    
    set objScripting = CreateObject("WScript.Shell")
    
    objScripting.Run("myCommandLineHere")
    
    set objScripting = nothing

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width