MACSCRPT Archives

January 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"J. Stewart" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 26 Jan 2007 08:16:30 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
On 1/25/07 at -0500 Jan Hendrikx said this

>I would like to create a file in a container field that I can send as 
>an attachment using SMTPit. 

You can't create a file in a container field. Files are file system entities and are created on a disk when you perform a 'save' operation of some sort.

>Is there any way to get a text field into a container as a usable
>file without actually creating the file in the finder and then
>importing it?

No, at least not the way you've asked it.

Some very simplistic descriptions:

File: discreet object stored on disk as part of your file system. When you open a text file in a text editor you are looking at the contents of a file as represented by that text editor. You are not looking at the file! There are programs that allow you to manipuate files (i.e. Finder) but you don't normally look at a file's contents with them.

Text Field: object generated by a program whose purpose is to contain text. 

Container: A general class of object in a program or file system which holds other objects. a few examples are text field, image well, file, folder, disk, window, variable.

It looks like you are asking if you can directly attach the the text in some text field of some unknown program to an outgoing email message to be sent via SMTP. The key words here being "directly attach" for which the answer is a qualified no. An 'attachment' to an email must be a file stored on disk.

If you are asking instead if you can send the text contained in that text field as a message via SMTP then the answer is "probably". It depends on the program's text field being accessible via Applescript directly or by GUI scripting. If this is the case then you can do what you've asked. In fact there are a number of options such as attaching it as a file (gotta save it to disk), inserting into an existing email or creating a new one (depending on the email program) or even sending direct using a third part osax.

JBS
-- 
Lettin' the cat outta the bag is a whole lot easier'n puttin' it back. — Will Rogers

ATOM RSS1 RSS2