[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1138
  • Last Modified:

Keystroke Counter

Hello Again Everyone!
I need to count keystrokes and mouse clicks on several pcs and log them to a file on a remote machine. There is no concern whatsoever as to what they are typing or clicking, simply a total count of keystrokes and mouse clicks on a per 10 minute basis. Any suggestions???? Thanks! Tim
0
tabolt
Asked:
tabolt
  • 5
  • 4
  • 2
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
What language are you working in tabolt?...

(You won't be able to do this in VBScript!)
0
 
taboltAuthor Commented:
I am open to most any suggestion if someone is willing to help guide me. Is there a way to do it in one language that is better than others?
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Well, what tools do you have available to you?

I can give you code in VB6, VB.Net 2003 or VB.Net 2005 Express.

This could also be in done in C#, C++, Delphi and many other languages I'm sure...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
taboltAuthor Commented:
Idle, Thanks for your assist. I'm currently running VS2005 on my box. Whatever is easiest and most convenient for you, I'll make it work. Thanks Again!
0
 
steveiamCommented:
The code here could serve as a good starting point: http://www.codeproject.com/dll/keyboardhook.asp

The 'catch' with global keyboard hooks is that the routine has to be in a DLL, so you have to:
 - make a DLL with the hook routine
 - make a main application that loads the DLL, and starts it off.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
That's not entirely true steveiam.

You CAN hook the keyboard and mouse WITHOUT using a DLL in VB6 or VB.Net by using WH_KEYBOARD_LL and WH_MOUSE_LL:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21596242.html
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21731363.html

For VB.Net 2005, the low level hooks only work when you run the RELEASE version of the app.  They won't work in the debug versions in the IDE for some reason.  They work fine in the IDE under VB.Net 2003 though.


0
 
steveiamCommented:
Ah.. Ok.. Its been a while since I did it, and it was in C++.  My apologies for the misinformation.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
The "LL" (low level) hooks are the only two you can do like this in VB6/VB.Net.  All other hooks must be accomplished via an external DLL as you describe.
0
 
taboltAuthor Commented:
Thanks for the input everyone! Idle, were you going to post sample code as I've never experiemented with these before? Thanks!
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Take a look at the two links in my previous comments...  =)
0
 
taboltAuthor Commented:
Sorry....I noticed that only after sending my last note. Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now