sending events with JScript?

This is a discussion on sending events with JScript? within the Networking/Device Communication forums, part of the General Programming Boards category; I know that this isn't the best place to ask about this, but does anyone know if it's possible to ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    100

    sending events with JScript?

    I know that this isn't the best place to ask about this, but does anyone know if it's possible to send keyboard events with JScript (MicroSoft JScript, not javascript)?

    I'd really appreciate it if somebody could either give me an example of how to do this or point me to some tutorial page where I could figure it out myself. That's of course only if it's possible to send kb events with JScript in the first place.
    Sauron a few seconds before his defeat:
    "What? A 'division by 0' error?!?"

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    100
    uh... figured it out myself with a little help from the MSDN database
    if anyone else's interested and wants to initiate keyboard events through WSH, you can just write something like this in your script files:
    Code:
    WScript.CreateObject("WScript.Shell").SendKeys("{CAPSLOCK}");
    //createobject returns a wscript shell object containing method that accpets a keystroke string as its argument
    Sauron a few seconds before his defeat:
    "What? A 'division by 0' error?!?"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Events
    By Dae in forum C++ Programming
    Replies: 0
    Last Post: 07-01-2009, 03:54 AM
  2. Sending data - line by line?
    By tuckker in forum C Programming
    Replies: 0
    Last Post: 02-21-2009, 08:31 PM
  3. signal sending and waiting
    By eva69 in forum Linux Programming
    Replies: 1
    Last Post: 10-03-2008, 05:07 PM
  4. seismic events program
    By santaclaus in forum C Programming
    Replies: 16
    Last Post: 11-23-2003, 02:23 PM
  5. ATL: fireing events from a Instanced object
    By CHECCO in forum C++ Programming
    Replies: 2
    Last Post: 09-03-2002, 07:05 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21