Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 08-29-2007, 07:27 AM   PM User | #1
djonatan
Banned

 
Join Date: Aug 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
djonatan is an unknown quantity at this point
detecting a keystroke?

so considering i know nothing about programming, could this be done in vbscript?
would it be like pages of typing or is it simple
djonatan is offline   Reply With Quote
Old 08-29-2007, 08:39 AM   PM User | #2
Philip M
Master Coder

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 9,522
Thanks: 113
Thanked 1,190 Times in 1,171 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura about
I expect it can be done in VBscript, but a simple JavaScript is

<SCRIPT type = "text/javascript">
document.onkeydown = function(ev) {
var key;
ev = ev || event;
key = ev.keyCode;
alert (key);
}
</SCRIPT>
Philip M is offline   Reply With Quote
Old 08-29-2007, 04:19 PM   PM User | #3
oracleguy
The Spaminator


 
Join Date: Jun 2002
Location: USA
Posts: 8,028
Thanks: 1
Thanked 204 Times in 200 Posts
oracleguy has a spectacular aura aboutoracleguy has a spectacular aura aboutoracleguy has a spectacular aura about
Quote:
Originally Posted by Philip M View Post
I expect it can be done in VBscript, but a simple JavaScript is

<SCRIPT type = "text/javascript">
document.onkeydown = function(ev) {
var key;
ev = ev || event;
key = ev.keyCode;
alert (key);
}
</SCRIPT>
Considering we are in the computer programming forum (assuming it wasn't moved here) I'd assume the OP was refering to VBScripts executing outside of a web browser.
__________________
OracleGuy
My Blog
"... the VP of our third biggest account started sweating bullets in our latest project status conference when Roy stood up and asserted: 'We don’t code our products for SMACKTARDS.'" - Daily Victim #564
oracleguy is offline   Reply With Quote
Old 08-29-2007, 04:51 PM   PM User | #4
sage45
Moderator


 
Join Date: May 2002
Posts: 1,030
Thanks: 0
Thanked 10 Times in 10 Posts
sage45 is an unknown quantity at this point
You could do it, you would just have to use the WSH in order to load the VBScript. But then you would want it to run in the background which would require a timer that would recycle and detect a keystroke, then take the appropriate action(s).

-saige-
__________________
HTML & CSS Forum Moderator

"If you don't know what you think you know, then what do you know."
R.I.P. Derrick Thomas #58
1/1/1967 - 2/8/2000
sage45 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.