You could greatly reduce the size of the log file, filtering the messages that you get from Windows and selecting the most important ones. In example, WM_COMMAND is sent when a button is pressed, and on other situations. Also you could track WM_KEYDOWN, WM_LBUTTONDOWN, etc. if AScan( {...