Re: Entourage/newbie question
Re: Entourage/newbie question
- Subject: Re: Entourage/newbie question
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 30 Jan 2001 10:16:09 -0800
On 1/30/01 9:29 AM, "Will Wade" <email@hidden> wrote:
>
Having trouble with the following..
>
>
Entourage is throwing back an error on the third to last line saying:
>
Microsoft Entourage got an error: Can't get |content| of incoming message id
>
4817.
>
>
global t
>
>
on SaveFile(t)
>
set txtFile to "Wills IX:Desktop Folder:imagesNeeded.txt"
>
set endFile to get eof txtFile
>
set theText to t
>
open for access txtFile with write permission
>
write return & theText starting at endFile to txtFile
>
close access txtFile
>
end SaveFile
>
>
tell application "Microsoft Entourage" to set currentMessages to the current
>
messages --
>
repeat with theMsg in the currentMessages --
>
set t to the content of theMsg
>
my SaveFile(t) --
>
end repeat
>
>
'content' here is a defined property of the Entourage class 'message'.
You're confusing AppleScript because you're attempting to use it outside a
'tell application "Microsoft Entourage' block and it is accessing a
different keyword or perhaps osax term 'content' from somewhere else. Just
use it in a tell block and you'll have no problems:
tell application "Microsoft Entourage"
set currentMessages to the current messages --
repeat with theMsg in currentMessages --
set t to the content of theMsg
my SaveFile(t) --
end repeat
end tell
--
Paul Berkowitz