Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

roontoon

macrumors newbie
Original poster
Sep 28, 2010
7
0
Hi,

I have the following code:


tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:"Boxee Show Notification", content:"A new episode of your show " & theFile & " has arrived", sender:"bitbucket"}
tell theMessage
make new to recipient at end of to recipients with properties {name:"dkamp", address:"dk@yada.com"}
make new to recipient at end of to recipients with properties {name:"CobbleCat", address:"Ca@yada.rr.com"}
end tell
send theMessage
end tell

This is being used inside of Hazel to notify me when a download has been completed. The problem I am having is on this line:

"A new episode of your show " & theFile & " has arrived" The file in question is the current one that Hazel is acting on BUT it delivers the entire path along with the file name. The question is how do I trim off the path so only the file name is left. I am OK with the file extension but I would really like to lose the path. Please educate me.

Thanks in advance. :apple::apple:

d
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.