R
Rick.Cogley
Hello -
I am on Entourage 11.2.3, Office 2004, OS/X. I've been struggling to
learn a little AppleScript, and noticed the scripts Entourage comes
with, which are to create from messages, either of events, tasks, or
notes. These are the scripts in the default scripts menu.
I'm looking for something that would create a note from a selected
event or events. I noticed you unfortunately cannot drag and drop
things around in Entourage, which is something sorely missing in my
opinion compared to Outlook. I'm used to that.
I thought I would be able to use the "create note from message" script
as a base, and convert it to instead create notes from selected events.
However, it seems that the AppleScript dictionary does not support what
I am trying to do.
The original MS script is below, and I started with:
-- get the currently selected message or messages
set selectedMessages to current messages
I tried converting this to:
set selectedEvents to current events
.... but this just gives a compile error: Expected end of line but
instead found plural class name.
Could any of the members be so kind as to comment on the above? Is this
even possible, given how the Entourage dictionary is set up? Any advice
much appreciated...
Kind regards,
Rick Cogley
== original microsoft script ==
(*
Create Note from Message
Copyright (c) Microsoft Corporation. All rights reserved.
*)
tell application "Microsoft Entourage"
-- get the currently selected message or messages
set selectedMessages to current messages
-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this
script." with icon 1
return
end if
repeat with theMessage in selectedMessages
-- get the information from the message, and store it in variables
set theName to subject of theMessage
set theCategory to category of theMessage
set theContent to content of theMessage
-- create a new note with the information from the message
set newNote to make new note with properties {name:theName,
category:theCategory, content:theContent}
-- create a link between the message and the new note
link theMessage to newNote
-- if there was only one message selected, then open that new note
if (count of selectedMessages) = 1 then open newNote
end repeat
end tell
I am on Entourage 11.2.3, Office 2004, OS/X. I've been struggling to
learn a little AppleScript, and noticed the scripts Entourage comes
with, which are to create from messages, either of events, tasks, or
notes. These are the scripts in the default scripts menu.
I'm looking for something that would create a note from a selected
event or events. I noticed you unfortunately cannot drag and drop
things around in Entourage, which is something sorely missing in my
opinion compared to Outlook. I'm used to that.
I thought I would be able to use the "create note from message" script
as a base, and convert it to instead create notes from selected events.
However, it seems that the AppleScript dictionary does not support what
I am trying to do.
The original MS script is below, and I started with:
-- get the currently selected message or messages
set selectedMessages to current messages
I tried converting this to:
set selectedEvents to current events
.... but this just gives a compile error: Expected end of line but
instead found plural class name.
Could any of the members be so kind as to comment on the above? Is this
even possible, given how the Entourage dictionary is set up? Any advice
much appreciated...
Kind regards,
Rick Cogley
== original microsoft script ==
(*
Create Note from Message
Copyright (c) Microsoft Corporation. All rights reserved.
*)
tell application "Microsoft Entourage"
-- get the currently selected message or messages
set selectedMessages to current messages
-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this
script." with icon 1
return
end if
repeat with theMessage in selectedMessages
-- get the information from the message, and store it in variables
set theName to subject of theMessage
set theCategory to category of theMessage
set theContent to content of theMessage
-- create a new note with the information from the message
set newNote to make new note with properties {name:theName,
category:theCategory, content:theContent}
-- create a link between the message and the new note
link theMessage to newNote
-- if there was only one message selected, then open that new note
if (count of selectedMessages) = 1 then open newNote
end repeat
end tell