Archive for the ‘VB6’ Category.

Removing Non-ASCII Characters

A couple of years ago, I was processing some IRC log files created by an Eggdrop I had running. However, I ran into some problems related to these log files having non-ASCII characters used. I need a quick way of stripping these characters out. The following is a VB6 program (source and binary available) that can process single text files and remove all non-ASCII characters from them. (Appending “.clean.txt” to the filename.)

This was only written for one-time use, so excuse the lack of comments, and the lack of general error checking etc. Someone even slightly skilled at Visual Basic 6 will be able to change the code to batch process files and embed some basic error handling. As with all programs, use this at your own risk.

Download

Clipboard Monitor

When I’m ingame with games such as Left 4 Dead 2, I often want to save chat from game lobbies, or during the game itself. However, it’s often incredibly difficult, requiring alt-tabbing out of the game, and this isn’t really feasible when in the middle of a round.

I’ve written this program, which monitors the contents of the Windows Clipboard, and saves any new content automatically. The idea being, you start the application before you launch a game, and let it run in the background. When ingame, you simply copy chat into your clipboard. The program will then automatically log it, and every minute, write to a log file on the hard drive. That way, there is no need to alt-tab or otherwise leave the game.

When finished, simply close the program, and access/read the log file. I’ve been testing this for the last day or so, and it seems to work fine without any crashes. I should note that it uses an MD5 implementation available here. I’m keeping the program closed-source for now, but if people want the code to verify there isn’t anything malicious going on, I may release it later.

Download:

Binary
Source

pidgin-logparser

pidgin-logparser will allow you to work with HTML format chat logs generated by Pidgin. This program is experimental and is currently capable of:

  • Loading up individual log files and saving the parsed version to either TXT or CSV.
  • Scanning through a properly formatted directory structure, parsing each valid HTML log file and exporting this data as CSV.

Notes:

  • The path for the “Parse Logs to CSV” function defaults to “%appdata%\.purple\logs\”. This path can be customized as of Build 33.
  • Command-line arguments are acceptable by this program. To load an individual log use: “pidgin-logparser.exe log.html”. To parse a properly formatted log folder, use “pidgin-logparser.exe +p %folderpath%”. (With a trailing slash.)
  • On Windows, you can also drag and drop an individual log into the executable to have it loaded.
  • A properly formatted logs folder must have the following folder format “\protocol\account\contact\”. Log files should be in the “\contact\” folder with a “.html” extension.
  • All output by this project will be placed in the \output\ folder in the same location as the executable. Ensure you have appropriate permissions to this folder.

This program was written using Visual Basic 6 for Windows systems. Unofficially, it has also been confirmed to work under Wine 1.01 on Ubuntu 9.04.

Google Code Project