Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'REVISED AGAIN! File naming for Entourage' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
REVISED AGAIN! File naming for Entourage
Authored by: MtnBiker on Feb 20, '03 03:28:30AM

I'm afraid I have a mental block against AS
Below is the script for Mail-how to change for Entourage. I looked at both dictionaries, but don't see where the stuff for Mail comes from:
tell application "Mail"
set the new_message to ¬
(make new outgoing message with properties ¬
{visible:true, content:" "})
tell the new_message
tell content
make new attachment with properties ¬
{file name:target_file} at ¬
before the first character
end tell
end tell
end tell
-------
My previous posting were too hastily posted. It's way past time to get to bed. Thanks for any help

---
Hermosa Beach, CA USA



[ Reply to This | # ]
REVISED AGAIN! File naming for Entourage
Authored by: ewelch on Feb 21, '03 11:12:12PM

Entourage? That looks like the mail script. ;-)

---
--
Eric

Zen master to hotdog vendor. \"Make me one with everything.\"



[ Reply to This | # ]
REVISED AGAIN! File naming for Entourage
Authored by: swamiswami on Mar 07, '03 03:17:29PM
I couldn't get the script above to work in Entourage. Here's a script that seems to work for me:

on open these_items
	tell application "Finder"
		(*this part is to rename the PrintJob.pdf file*)
		repeat with aFile in these_items
			set a to the name of aFile
			display dialog "Enter file name for attachment" default answer a
			set the name of aFile to the text returned of result
		end repeat
	end tell
	
	
	tell application "Microsoft Entourage"
		set the new_message to (make new outgoing message with properties {attachment:{file:these_items}})
		open new_message
	end tell
end open


A few notes:
  • For some reason the dialog to rename the file doesn't come to the front automatically
  • Neither does the completed email message (although it is ready to go when you switch to Entourage)
  • I don't know why the repeat loop is needed since the print job should be a single file

Hope this helps someone.

-->Steve

[ Reply to This | # ]