Name of crashed app

How can i get name of crashed app?

Look in the system log.

I know that crashes are logged to

Macintosh HD:Users:username:Library:Logs:CrashReporter:
Macintosh HD:Library:Logs:CrashReporter:

but i dont know how to get name of crashed application from logs using grep or some other way, since i dont know anything about grep.

One way would be use folder action which kicks on if folder is modified, but it should somehow get name of modified log file.

Hi Cirno

I use this script that when a file is added to a folder it mails me the added report, it then deletes the file ready for the next added report of the same name.

property dialog_timeout : 30 – set the amount of time before dialogs auto-answer.
on adding folder items to this_folder
---------------------------------------------
tell application “System Events” to tell process “Mail”
activate
delay 5
keystroke “n” using command down
try
set _folder to alias “Macintosh HD:Users:Budgie:Public:Drop Box:”
set theAddress to “Budgie@.co.nz”
set theSubject to “Report”
tell application “Finder” to set theAttachments to files of _folder whose name contains “.log”
tell application “Mail”
activate
set newMessage to make new outgoing message with properties {subject:theSubject, content:return & "Attachment: " & return}
tell newMessage
make new to recipient at end of to recipients with properties {address:theAddress}
–set visible to true --so you can edit the message
tell content
if ((count of item of theAttachments) > 0) then
repeat with theAttachment in theAttachments
make new attachment with properties {file name:((theAttachment as text) as alias)} at after the last paragraph
send newMessage --this automatically sends the mail
tell application “Finder”
delete (files of folder “Macintosh HD:Users:Budgie:Public:Drop Box:” whose name contains “.log”)
end tell
end repeat
end if
end tell
end tell
end tell
end try
end tell
end adding folder items to

Budgie

The question is:

What are you trying to accomplish? This will help people solve your problem better.