ibookdoug Posted February 6, 2003 Posted February 6, 2003 Hope someone can help me !! I'm trying to create a new event in iCal using a date field from Filemaker using Applescript. Here is the script i've got: set calTitle to "Work" set eventTitle to "Filemaker Test" set eventDay to cell "date_day" of current record set eventMonth to cell "date_month" of current record set eventYear to cell "date_year" of current record tell application "iCal" set bDate to current date set time of bDate to 32400 -- seconds, = 9 hours = 9am set year of bDate to eventYear set month of bDate to eventMonth set day of bDate to eventDay set myevent to make new event at the end of events of (item 1 of (calendars whose title is calTitle))
ibookdoug Posted March 12, 2003 Author Posted March 12, 2003 In case anyone is interested , here's what you should: tell application "FileMaker Pro"
Kurt Knippel Posted October 28, 2003 Posted October 28, 2003 I am attempting to publish an iCal calendar via the example at www.filemaker.fm, and I am not having much luck. Anyone done any publishing of iCal calendars with Filemaker? Or have you looked at this example?
Sintax Posted July 14, 2004 Posted July 14, 2004 I know this topic is over a year old now but I want to incorporate adding iCal events into my FM program. Did anyone ever have any luck with this or know of a tutorial out there somewhere that might be able to help me out? Thanks, Abraham
Newbies fiat154 Posted August 6, 2005 Newbies Posted August 6, 2005 I have recently been wanting to do this also and through a bit of Applescript research and other posts on the web I created this AppleScript which may help you. It will prompt you to enter in all details of your meeting and post the event into iCal. simply use this AppleScript as a 'Perform Applescript' step in a filemaker script. Thanks, Paul. set alarmTrigger to "-20" set soundName to "Sosumi" set TodaysDate to current date set TodaysDate to date string of TodaysDate set MakeNewEvent to true tell application "iCal" set CalendarList to every calendar set CalendarNames to title of every calendar end tell set theCalendar to choose from list the CalendarNames with prompt ¬ "Choose target calendar from list" tell application "iCal" repeat with i from 1 to count of CalendarList if theCalendar as string is the title of calendar i as string then set TargetCalendar to calendar i end if end repeat end tell set the result to display dialog "Enter the summary of the Event (required)" default answer "Meeting with " set theSummary to text returned of the result set today to my PrepDate() set result to display dialog "Enter the starting date" default answer today set tempStartDate to (text returned of the result) set result to display dialog "Enter the starting time (leave blank for all day)" default answer "9:00AM" set tempStartTime to (text returned of the result) if tempStartTime is "" then set eventIsAllDay to true set tempStartTime to "9:00AM" set thestartdate to my fixStartDate(tempStartDate & ", " & tempStartTime) set theDuration to 8 * 60 else set eventIsAllDay to false set thestartdate to my fixStartDate(tempStartDate & ", " & tempStartTime) set result to display dialog "Enter the duration in minutes" default answer "60" set theDuration to (text returned of the result) end if set theEndDate to thestartdate + theDuration * minutes set result to display dialog "Enter the location of the event" default answer "Red-i Design Boardroom" set theLocation to (text returned of the result) tell application "iCal" tell TargetCalendar set NewEvent to make new event at end of events with properties {start date:thestartdate, end date:theEndDate, summary:theSummary as string, location:theLocation, allday event:eventIsAllDay} tell NewEvent make new sound alarm at end of sound alarms with properties {trigger interval:alarmTrigger, sound name:soundName} end tell end tell end tell on fixStartDate(tempStartDate) set thestartdate to date tempStartDate return thestartdate end fixStartDate on PrepDate() set thisdate to ((current date) + 1 * days) set monthlist to {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} repeat with theMonth from 1 to 12 if (month of thisdate as string) is (item theMonth of monthlist) then exit repeat end repeat set theYear to the year of thisdate set theDay to the day of thisdate set today to theDay & "/" & theMonth & "/" & theYear as string return today end PrepDate show event
mminer Posted September 14, 2005 Posted September 14, 2005 For what it's worth, here's a script that works: tell application "FileMaker Pro" tell current record of window 1 set dateStartTxt to cell "AlarmTimestamp" --set dateEndTxt to cell "TimeStampEnd" set theSummary to cell "AccountID" --set theCalendar to cell "CalendarName" end tell end tell set DateStart to date dateStartTxt --set DateEnd to date dateEndTxt tell application "iCal" tell calendar "work" set new_event to make new event at end of events tell new_event set start date to DateStart --set end date to DateEnd set summary to theSummary --set location to "some location" set allday event to false set status to confirmed make new sound alarm at end of sound alarms with properties {trigger interval:-5, sound name:"glass"} end tell end tell end tell
Recommended Posts
This topic is 7009 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now