Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Make new event in ical

Featured Replies

Hi! I know absolutely nothing about AppleScript, and in fact only started using FileMaker a short while ago. I thought, like most other things, I would be able to find engouh examples or at least a reference on applescripting to be able to write a script, but I was wrong. Really, really wrong. Because I can't find anything close to what I want to do, which is shocking. Anyway, on to the task at hand:

I need to be able to click a button in my database that will say "Add event to iCal" and actually have that event added to iCal. That's it. Nothing fancy. But anything I've tried has been a stab in the dark and has produced either no results, or error messages. Does anybody have any good resources on this stuff, or know of anything at all that could help me?

I will be forever grateful to all who help. THANKS!!!!!!!

Amber

Yes, it is sad that there are few good resources. It is partly because FileMaker is cross-platform, hence AppleScript is limited to Macs (duh). But it is also because Apple has not been 100% behind AppleScript in its own applications. For example, I spent days working out synchronization between FileMaker and iCal, only to find a flaw in iCal's dictionary. Which is that you cannot get or set the note of a To Do (events are fine however). I decided to wait until they get serious. In any case, here's an AppleScript to create an event.

You must have the fields specified (or change them) on the current record on the current layout. That's easiest.

Uncomment the --tell application "FileMaker Developer" and its --end tell lines to open the below in Script Editor. But they are not needed inside a FileMaker Perform AppleScript step. It's best to write AppleScripts in Script Editor, for its syntax coloring and error checking, then copy/paste into a FileMaker Perform AppleScript step, and comment the appropriate lines.

I've commented the location line, as I wasn't using it. You could.

--tell application "FileMaker Developer"

tell current record of window 1

set dateStartTxt to cell "TimeStampStart"

set dateEndTxt to cell "TimeStampEnd"

set theSummary to cell "EventName"

set theCalendar to cell "CalendarName"

end tell

--end tell

set DateStart to date dateStartTxt

set DateEnd to date dateEndTxt

tell application "iCal"

tell calendar "your calendar name"

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

end tell

end tell

end tell

  • Author

You've just made me (and my boss and the events planning people) extremely happy. Thank you so much! Honestly, I will bake and ship you cookies if you want. :]

Amber

You're welcome. Unfortunately, re: cookies, I'm afraid I'm kind of on a diet. Too much sitting around at the computer :-]

Here's another little tidbit, which I gathered from someone else. You can create an alarm for an event via AppleScript also.

-- No. alarms are not properties, they're elements. You have to make them after the event exists:

set StartDate to "11/24/2003 9:00 AM"

set enddate to "11/24/2003 10:00 AM"

set alarmTrigger to "-15"

set soundName to "Sosumi"

tell application "iCal"

set newEvent to make new event at end of calendar 3 with properties {summary:"hello", start date:StartDate, end date:enddate}

tell newEvent

make new sound alarm at end of sound alarms with properties {trigger interval:alarmTrigger, sound name:soundName}

end tell

end tell

You would have to do what he's done, to create a variable to reference the event. Just put...

set newEvent to make new event

...when you create the event. newEvent is then a variable which can be used to address that event for the alarm.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.