0 Replies Latest reply on Mar 11, 2013 7:10 AM by DanOrlow

    Add Attendee to Ical event

    DanOrlow

      Title

      Add Attendee to Ical event

      Post

           First off I dont' know much about scripting, either Applescript of in Filemaker. But, I can usually adjust existing scripts to my needs.

           I have a script to create ical events (I don't remember where i found it). I'm trying to add an attendee with alarm and email.

           I have these lines of code that I'm trying to make work, but I add it after the line to set the event I end up with a variety of errors depending on how I change operators.

           Any help, suggestions, hints, tips, etc would be apprecitaed

      tell theEvent to make new attendee at beginning of attendees with properties {display name:theAttendees, email:AttendeeEmail}

           or

      tell new_event to make display alarm at end of display alarms with properties {trigger interval:-60}
            make attendee at end of attendees with properties {display name:Attendee, email:AttendeeEmail}
              end tell

            

           This is the script I have, it works great until I try to add the attendee code.

      //Create new event in iCal with event data from fmp
           Let ( [
                 
               v.Calendar = "\"" & "Calendar"& "\"" ;
               v.Location ="\"" & Contacts::Location & "\"" ;
               v.Summary = "\"" & Contacts::ContactMethod & " "  & Contacts::First Name &  " at "   &  Contacts::Company Name  &  "\"" ;
               v.Description = "\"" & Contacts::Description & "\"" ;
               // In the following variables FromTime and ToTime Fields Time must be formatted like the following 1:00:00 PM, 11:00:00 AM .
               v.From = "\"" & DayName ( Contacts::From ) & ", " & MonthName ( Contacts::From ) & " " & Day ( Contacts::From ) & ", " & Year ( Contacts::From ) & " " & Contacts::FromTimeCalc & "\"" ;
               v.To = "\"" & DayName ( Contacts::From ) & ", " & MonthName ( Contacts::From ) & " " & Day ( Contacts::From ) & ", " & Year ( Contacts::From ) & " " & Contacts::FromTimeCalc & "\""
           
               ];
           "tell application \"iCal\""
                       & ¶ &
                           "set my_event to make new event at end of events of calendar " & v.Calendar & " with properties {description:" & v.Description & ", summary:" & v.Summary & ", location:" & v.Location & ", start date:date " & v.From &     ", end date:date " & v.To & "}"
                       & ¶ &
                       "end tell"
           
               )