AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

#Errorlog FileName

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Tue May 18, 2004 9:41 pm    Post subject: #Errorlog FileName Reply with quote

Would it be possible to add maybe a Directive named #Errorlog and have it's Parameter be the filename of where to store the error's. The log file would just have the exact same info as the message box except maybe add date and time to it. And if a second error occurred and the file was still there it would append to it. I had a problem with an old AutoIt script that would error out on remote computers and the users would always click on ok without calling the helpdesk. It would have been nice to have this option back then.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed May 19, 2004 12:04 am    Post subject: Reply with quote

Jack Horsfield asked for something similar in conjuction with debugging, except that the error messages would be sent to stdout so that the editor could receive them and display them all, perhaps jumping to the offending line as well.

AHK does not generate a lot of runtime errors because one of the design goals was to catch as many problems as possible at the time the script is launched. Which types of runtime errors are your scripts generating?

In any case, I'll add this to the list. I imagine you want each error msg to be both displayed and output to the file.

Btw, thanks for your latest testing on NT4. I should now be able to improve the Send command and GetKeyState on that platform.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed May 19, 2004 12:28 am    Post subject: Reply with quote

Quote:
Which types of runtime errors are your scripts generating?

The one I kept running into was a problem with NT's "net time" I would have my script read an INI file for another Server / Client application, and if the installer set server=c: instead of server=\\computername\c, it would cause an error. But it was sporadic and didn't happen all the time. I eventually found the problem and worked around it, but it took me like 6 months to actually see the error. All I knew was that the script wasn't running when I checked it for problems. The only runtime error I have run into with AHK is if you use Run or RunWait on an EXE file that doesn't exist it errors out. I have ran into that a couple of times with a Remote PC's script where I have a batch job setup for our helpdesk to run things on remote PC's based on copying over INI files and if they make a typo, they usually don't know they have until I notice the script isn't running any more.

Quote:
In any case, I'll add this to the list. I imagine you want each error msg to be both displayed and output to the file.

Definitely not a high priority, just when I ran into the problem recently I thought it would be a nice addition. Both message and output file is preferred.

Quote:
Btw, thanks for your latest testing on NT4. I should now be able to improve the Send command and GetKeyState on that platform.

My pleasure to help.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Thu May 20, 2004 3:12 pm    Post subject: Reply with quote

Quote:
I have ran into that a couple of times with a Remote PC's script where I have a batch job setup for our helpdesk to run things on remote PC's based on copying over INI files and if they make a typo, they usually don't know they have until I notice the script isn't running any more.

I didn't clarify that to fix the problem I just added to my script an IfExist command so that it would only run the Run command if the EXE existed.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group