• 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: Variables & quotes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variables & quotes


  • Subject: Re: Variables & quotes
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 23 Sep 2009 14:09:13 -0700

On Sep 23, 2009, at 1:35 PM, Jeremy Matthews wrote:

not sure what I am missing….

Two things.  First is that choose from list returns a list, so you need to get item 1 from it.  Secondly, you don’t need "at end”.

set theDate to current date
tell application “iCal”
set the CalendarNames to title of calendars whose writable is true
set myresult to item 1 of (choose from list CalendarNames with prompt "Choose the calendar to receive events:")
tell calendar myresult
make new event at end with properties ¬
{description:"New Event", summary:"Event Summary", location:"Orlabdo", start date:theDate, allday event:true}
end tell
end tell

-- Michelle

--
"I'll do the best I can do because that's the best I can do!"

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Variables & quotes (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: Re: Variables & quotes
  • Next by Date: Illustrator CS 3 'open' command sometimes throws error 8700
  • Previous by thread: Re: Variables & quotes
  • Next by thread: Applescript compatibility under Snow Leopard
  • Index(es):
    • Date
    • Thread