Results 1 to 4 of 4

Thread: Log Key Press

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    Talking

    can someone show me how to log k when the k button is pressed using the constant's from constant.txt this way I can create one for each key easily. Thanks.
    -RaY
    VB .Net 2010 (Ultimate)

  2. #2
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155
    You could use the forms KeyPress event?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    I know that part

    in the event form key press even...

    what would i write

    for example would i have to open the \flag\log\key.log file before i write to it...even if i didnt how would i go about that...how would i get the program to realize im pressing "k"....got what i mean?
    -RaY
    VB .Net 2010 (Ultimate)

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Question

    Hi fallnwrld, Is you want your program always write a log file when a buddy have press the "k" button?

    Then I think JasonGS was answer most of your question.
    and all you need is just open the specified log file and jot down the events data and time as...

    Code:
        Open App.Path & "\flag\log.log" For Append As #1
            Print #1, "[" & Format(Date, "dd/mm/yyyy") & " " & Format(Time, "h:mm:ss AMPM") & "] key k was press by user."
        Close #1

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