Results 1 to 5 of 5

Thread: Sending keystrokes to a file

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2000
    Location
    Seattle, WA, USA
    Posts
    46

    Post

    Does anyone know how to send captured keystrokes to a file? My program can capture keystrokes but I don't know how to send them to a file, so that I can view the captured keystrokes. Please help.


    Thanks,

    Kevin

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Code:
    Dim iFile As Integer
    iFile = FreeFile
    Open "C:\Log.txt" For Append As iFile
    Print #iFile, sCapturedKey;
    Close iFile
    Ideally you wouldn't want to append the file everytime a new key was captured, you'd want to buffer them in a String then Append them to the file in blocks.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2000
    Location
    Seattle, WA, USA
    Posts
    46

    Post

    Ok, that works, but it displays the captured keys vertically in the text file. How do I make it display them horizontally?

    Thanks,

    Kevin

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    If you included the Semicolon as I did in the Example, it would store the Characters Horizontally.

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2000
    Location
    Seattle, WA, USA
    Posts
    46

    Post

    What is the sCapturedKey varible, is that just an example of the varible where my key strokes are beeing stored? Because, when I use it that it does not work, but if I replace that with the key letter it works?? Why??

    Thank A Lot,

    Kevin

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