wsh - Read keypress using JScript -


I was trying to do a simple jscript using a user script host (outside of any browser, my intention was) I am, but can not find a way to do:

  Faucet the function (e) {... code ...} document.onkeypress = tap;   

I'm not a Windows system programming boy (but an experienced programmer) so I'm an ActiveX gadget and services and so unfamiliar. Does WScript or WSShell provide a way to open a window (instead of 'document')?

Or do I have to force this to work from the browser? Overkill seems ...

Windows Scripting Host does not provide any UI, OK, on ​​GUI Not least.

If you use CScript.exe , then you can use studines, studs, etc.

Most of these objects include Windows Scripting Host:, Dictionary and filesystem objects:

But if you want a GUI, you can run an HTA file in MSHTA.exe And use the WSH object to meet your UI requirements and you can use HTML / CSS / JavaScript.

Overkill? Well, let's list what you want from your UI Now, you have to provide a mechanism to access all those features. And your example code shows that you want to do this in HTML-DOM-via-JavaScript-like mode. Therefore, you will need an HTML parser and DOM support. It seems that you want to access most of the browser at that point.

Comments