Hi… my script apparently was not even really working as far as I thought it was… I made some changes but I cannot for the life of me figure out what I am doing wrong!!! Someone please help!!!
my problem is: once a calendar event is selected… I get errors everytime I try to get the summary, start date, end date, location, information…
What is the proper syntax to get it to recognize that I am referencing a particular UID???
set string_fun to 1
set list_number to 0
set event_choose to {}
set final_location to ""
set final_url to ""
set uid_list to {}
set final_description to ""
set final_status to ""
set regan_repeat to false
set regan_remy to 1
tell application "iCal"
activate
set visible of window "iCal" to true
set the_cal to the title of every calendar
set list_choice to (choose from list the_cal)
set list_string to (list_choice as string)
repeat with list_number in the_cal
set descriptionval to {item string_fun of the_cal} as string
if descriptionval = list_string then
else
set string_fun to string_fun + 1
end if
end repeat
set event_list to calendar string_fun's events
repeat with event_cur in event_list
tell event_cur
set editdate to (start date as string)
set the end of event_choose to editdate & " " & summary
set the end of uid_list to uid
end tell
end repeat
set event_choice to (choose from list event_choose)
repeat until regan_repeat
set char_line to item regan_remy of event_choose
if (char_line as string) = (event_choice as string) then
set regan_repeat to true
set the_uid to item regan_remy of uid_list
else
set regan_remy to regan_remy + 1
end if
end repeat
-- THIS IS WHERE I NEED HELP!!!!!!!!!!!!!!!!!!
set collect_data to calendar string_fun's event whose uid is the_uid
tell collect_data
set final_summary to summary
set final_startdate to start date
set final_enddate to end date
set final_location to location
set final_url to url
set final_description to description
set final_status to status
(* need to work on this part later
try
repeat atendno in attendee times
set final_attendee to end of attendee
end repeat
end try
*)
end tell
end tell
set the_sub to "Calendar Information"
set the_sender to ""
set the_message to "Automatic iCal email notifaction!" & return & return & "Event Summary: " & final_summary & return
set the_message to the_message & "Event Start Date: " & final_startdate & return
set the_message to the_message & "Event End Date: " & final_enddate & return
try
set the_message to the_message & "Event Location: " & final_location & return
on error number -2753
end try
try
set the_message to the_message & "Event URL: " & final_url & return
on error number -2753
end try
try
set the_message to the_message & "Notes: " & final_notes & return
on error number -2753
end try
try
set the_message to the_message & "Event Description: " & final_description & return
on error number -2753
end try
try
set the_message to the_message & "Event Status: " & final_status & return
on error number -2753
end try
tell application "Mail"
activate
set newMessage to make new outgoing message with properties {subject:the_sub, content:the_message}
tell newMessage
set visible to true
end tell
end tell