Hey All,
I’ve got ths script below to trash the INBOX.msf file for a Netscape email user. It’s set to a specific user only at this point. I’d like to be able to use the script on any users mac, but I can’t figure out how to set the following:
- User directory (the user directory can either be the mac user’s name or default).
- The .slt directory (which is different on every user account).
Any help would be greatly appreciaited.
Here’s the script as written for a single user:
------------------------------------------------------
-- trash1969.scpt
-- august 01, 2006
-- version 1.0 beta
------------------------------------------------------
set myHome to path to home folder as string
set mailSpool to (myHome & "Library:Mozilla:Profiles:user name here:x9qnghco.slt:ImapMail:mail.pbpost.com") as string
tell application "System Events"
if application process "mozilla-bin" exists then
tell application "Netscape"
quit
end tell
end if
end tell
tell application "Finder"
try
delete (files of folder mailSpool whose name contains "INBOX.msf")
end try
end tell
display dialog "1969 messages should be deleted. Click Restart Netscape to continue." buttons {"Restart Netscape", "Cancel"} default button 1 with icon 2
tell application "Netscape"
activate
end tell