Re: iCal organization with dates & events & lists....
Re: iCal organization with dates & events & lists....
- Subject: Re: iCal organization with dates & events & lists....
- From: "Patrick Collins" <email@hidden>
- Date: Thu, 17 Mar 2005 14:17:17 -0800 (PST)
- Organization: Collinator Studios
this has my application of your suggestion........ I get an ical error:
item 1 of event_list of <script> doesn't understand the date_time message.
-patrick
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 attendee_list to {}
set summary_list to {}
set description_list to {}
set startdate_list to {}
set enddate_list to {}
set status_list to {}
set url_list to {}
set location_list to {}
set final_description to ""
set final_status to ""
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 my 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 my event_list
tell event_cur
set cal_date to (start date as string)
set datetime_string to my date_time(cal_date)
date_time(datetime_string)
set editdate to datetiem_string
set the end of event_choose to editdate & " " & summary
set the end of summary_list to summary
set the end of startdate_list to start date
set the end of enddate_list to end date
set the end of location_list to location
set the end of url_list to url
set the end of description_list to description
set the end of status_list to status
set the end of attendee_list to {display name of attendees}
set the end of uid_list to uid
end tell
end repeat
set event_choice to (choose from list event_choose)
repeat with I from 1 to (count of event_choose)
set char_line to item I of my event_choose
if (char_line as string) is equal to (event_choice as string) then
set the_uid to item I of uid_list
set the_summary to item I of summary_list
set the_startdate to item I of startdate_list
set the_enddate to item I of enddate_list
set the_location to item I of location_list
set the_url to item I of url_list
set the_attendee to item I of attendee_list
set the_status to item I of status_list
set the_description to item I of description_list
exit repeat
end if
end repeat
end tell
set the_sub to "Calendar Information"
set the_sender to ""
set the_message to "Automatic iCal email notifaction!" & return & return
& "Event Summary: " & the_summary & return
set the_message to the_message & "Start Date: " & the_startdate & return
set the_message to the_message & "End Date: " & the_enddate & return
try
set the_message to the_message & "Location: " & the_location & return
on error number -2753
end try
try
set the_message to the_message & "Event URL: " & the_url & return
on error number -2753
end try
try
set the_message to the_message & "Event Description: " &
the_description & return
on error number -2753
end try
try
set the_message to the_message & "Event Status: " & the_status & return
on error number -2753
end try
set spaceflag to false
set UpperCase to "ABCDEFGHIJKLMNOPQESTUVWXYZ"
set LowerCase to "abcdefghijklmnopqrstuvwxyz 1234567890"
set theString to (the_attendee as string)
set theCharacters to characters of theString
set tmpWords to {}
set tmpWord to ""
repeat with tmpChar in theCharacters
set tmpChar to (tmpChar as string)
considering case
if tmpChar is in UpperCase then
if not spaceflag then
if tmpWord is not "" then copy tmpWord to the end of tmpWords
set tmpWord to tmpChar
else
set tmpWord to (tmpWord & tmpChar) as string
end if
else if tmpChar is in LowerCase then
if tmpChar = " " then
set spaceflag to true
else
set spaceflag to false
end if
set tmpWord to (tmpWord & tmpChar) as string
end if
end considering
end repeat
copy tmpWord to the end of tmpWords
set AppleScript's text item delimiters to {", "}
set tmpWords to (tmpWords as string)
set AppleScript's text item delimiters to {""}
try
set the_message to the_message & "Attendees: " & tmpWords & 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
on date_time(datetime_string)
local my_date
try
set my_date to date datetime_string
return short date string of my_date & " " & time string of my_date
on error
return "unrecognized date string"
end try
end date_time
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden