954,193 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VBScript Beginner Questions

Ok, I have programmed in c++ for a while, but recently, I have found an emulator that supports vbscript files and have some questions about it.

What I need to do, is detect a keystroke with the vbscript. How does one go about detecting a keypress with a vbscript, while an emulator is busy running a rom. I then need to send a series of keystrokes to the emulator, such that it thinks they were pressed by the user. Is all of this possible with a vbscript file? Do I need to do my chore with an actual language.

Also, if all of this is possible, how do I make it so that the vbscript doesnt use crazy amounts of cpu. I need it to be active enough to catch the keypress, but that is all. Is there a way to set up an onEvent with a keypress. Mind you though, this isnt a script running in Internet Explorer, it is being processed by an emulator, which does have support for any standard vbscript, along with its own little library of functions.

Thank you much.

petzoldt01
Junior Poster in Training
52 posts since May 2006
Reputation Points: 10
Solved Threads: 0
 

Not unless the emulator has an API or Object that you can use to hook keystrokes. On it's own, it doesn't offer keyhook abilities. For that, you'll need a full-fledged language. I suppose it would be possible to make some kind of keyhook class, and use createobject within the VBScript to instantiate an instance of a keyhook object, but you'll have to do all the keyhook work from a full language.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You