Nicolas Posted July 16, 2004 Report Share Posted July 16, 2004 hi everybody and thanks for this forum !! much more user-friendly than the newsgroups I have a set of more than 700 macros and one of them is dedicated to logging informations into a log file : Log Errors Date/Time: Save "dd.MM.yyyy hh:mm" into %T97% Clipboard Empty Clipboard Start Copy Text Type: %T97% | %T98% %T99% Clipboard End Copy Clipboard Append Text: "log.txt" Variable Set String %T99% "" the idea is : %T98% is the name of a macro, initialized when launching this macro %T99% is a message I want to log so everytime I want to write a message in my log file, I simply use : Variable Set String %T99% "hello world" Macro Run: LOG the problem is : sometimes (and of course I don't know why) this macro freezes ... in the icons tray, i can see in the tooltip displayed on the ME icon that this macro "LOG" is running, but it never comes back to the calling macro I don't know exactly where it freezes in the macro code, and when it happens I can't stop ME anymore (using the abort macro hotkey as usual) : I have to reboot and then my macro will work fine .. again ... until the next time if you have any idea, it would be of great help as this macro is called a lot of times every day and night ... thanks (and sorry for my english ) Quote Link to comment Share on other sites More sharing options...
floyd Posted July 17, 2004 Report Share Posted July 17, 2004 Nicolas, First determine if it is the clipboard that is causing the problem. Change your logging code to: Date/Time: Save "dd.MM.yyyy hh:mm" into %T97% Replace "%T99%" with "%T97% | %T98% %T99%" in %T99% Variable Modify String: Append %T99% to Text File Variable Set String %T99% "" If this doesn't change your results, then check to determine if the log file is being accessed by something else making it unwriteable. Quote Link to comment Share on other sites More sharing options...
Nicolas Posted July 19, 2004 Author Report Share Posted July 19, 2004 eeeeh ... i did not know this "Append to Text File" command, seems great i'll test it and tell you in a couple of days if it still freezes thanks ! Quote Link to comment Share on other sites More sharing options...
kevin Posted July 22, 2004 Report Share Posted July 22, 2004 Have you tried the "Log Message" command? This command seems to do what you need including adding a date/time stamp. It is found in the Debug category of commands. Quote Link to comment Share on other sites More sharing options...
Nicolas Posted July 22, 2004 Author Report Share Posted July 22, 2004 hum ... it seems to do exactly what i'm doing ok i'll replace, thanks for the info anyway, i still have this "freeze" problem that sometimes occur, but since I changed my LOG macro (using "Append to Text File") it freezes in the next called macro really strange ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.