• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Entourage X: creating a new message from a new task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entourage X: creating a new message from a new task


  • Subject: Re: Entourage X: creating a new message from a new task
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 24 Jun 2002 01:11:01 -0700

set taskName to name of window 1
set theseTasks to (every task whose name is taskName)

set c to (count theseTasks)
if c = 1 then
--you've nabbed it
set theTask to item 1 of theseTasks
else if c = 0 then
--oops
beep 2
display dialog "The front window isn't a Task, silly."
return
else
set theTask to AskTheUser(theseTasks, theName)
end if

on AskTheUser(theseTasks, theName)
set dueDateList to {}
tell app "Microsoft Entourage"
repeat with i from 1 to (count theseTasks)
set aTask to item i of theseTasks
set dueDate to due date of aTask
set end of dueDateList to dueDate
end repeat

set whichOne to (choose from list dueDateList with prompt "Which
task named" & theName " is it?") as string
if whichOne is "false" then error number -128

tell me to set theDate to date whichOne

set theTask to first task whose name is theName and due date is
theDate

end tell

return theTask

end askTheUser
--------------------------------------

Untested. If something's wrong, perhaps you'll figure it out.



--
Paul Berkowitz

> From: garrett <email@hidden>
> Date: Mon, 24 Jun 2002 02:42:41 -0500
> To: AppleScript Users <email@hidden>
> Subject: Entourage X: creating a new message from a new task
>
> Running Entourage X SR1:
>
> The idea is this:
>
> I create a new task - fill it all out, then I wanna goto the scripts menu
> and invoke a script that will take certain info from the task and create a
> mail message.
>
> The trouble is how do I access the open task - I can't
>
> set x to selection
>
> because it isn't selected anywhere in any list. the only reference I could
> find for it would be:
>
> set x to Window 1 (being always the front most window)
>
> trouble is all that does it set x to the task name - as text but not the
> class of the window or an ID, so that's useless.
>
> Now I know I can close the task and select it in the tasks window then
> invoke the script, but is there a way to do it with it open?
>
> I could also
>
> set x to last task
>
> and this will work allowing that the u are doing this on a new task but not
> if u have an older task open.
>
>
>
> -------
> garrett
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Entourage X: creating a new message from a new task
      • From: Paul Berkowitz <email@hidden>
References: 
 >Entourage X: creating a new message from a new task (From: garrett <email@hidden>)

  • Prev by Date: Entourage X: creating a new message from a new task
  • Next by Date: Getting image size (height, with) in Quark
  • Previous by thread: Entourage X: creating a new message from a new task
  • Next by thread: Re: Entourage X: creating a new message from a new task
  • Index(es):
    • Date
    • Thread