start a script out of ical to find the matching FileMaker data

Hi all,

I was able to subscribe from ical to FileMaker where I do my todos of my addresses and who I have to call on which day.
I would like to make a link into my ical todo - when pressed that a Script will tell Filemaker to find the matching file / person.

for example:

tell application "FileMaker Pro Advanced"
	do script FileMaker script "xy"
end tell

will run a specific filemaker script where I could define a search.

How is it possible to run a script out of ical which should not be a reminder - more like a link where I klick on and the script starts. Maybe with the hole script text in the note field - then I could already generate the script words in Filemaker with the search words, make a todo in ical out of it and - or is that a wrong direction… just starting with Applescript - sorry.

Best regards and a nice drift into 2007 - Christoph

Model: G4 867 MDD
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi Chris

You might be able to do it the other way round and have a button in filemaker which when clicked starts a script
which searchs ical for a particular day or date or even data and opens the corresponding records in filemaker!
Not sure if you can make clickable items that run a script in ical (But could be wrong) think its just the run script event in ical that triggers scripts…

Hi Pidge1,

thank you for your reply. I´m sending my todo-info from Filemaker to iCal - so I though I could also send an ID of the related Filemaker file. This ID could be taken to fill in a search at filemaker. I found out that when I write something like file://localhost/Users/kel/Desktop/linkapp I can selct it and with right-click I can choose between open URL or make a link.
It doesn´t work right now with the link above - maybe I have to get another way. The best and easiest for me would be if I could already generate the whole script in filemaker for a field and this field will be transferred to the iCal todo - then I only have to selct it and get it.

Is this possible anyhow?

Thanks in advance - Christoph

Just found out it works with: file:///Users/Christoph/Desktop/
I can select it in iCal and right-click make a link - click on it and then my applescript on the desktop can run a script inside Filemaker:

tell application "FileMaker Pro Advanced"
	do script FileMaker script "script"
end tell

Now I have to find a way to the searching… how can I transport some specific information or an ID with that applescript into the filemaker script - or do I have to generate a seperate search script for each filemaker file that makes an todo?

Thanks - Christoph

I thought about it the following way:

I make an ID-field in Filemaker which has a number for every filemaker file in the database. This ID will be the first thing that gets transfered into the Note-field of the iCal ToDo.

Now I need a script that copies this first word (number) - can be either 7 or 3423 - out of the note field of iCal - goes to my filemaker database and make a search for this number in the ID field.

I have some rudimental scripting that goes to filemaker but have no idea about the searching and navigating and the copying of the number out of the note filed in iCal… any ideas?

tell application "FileMaker Pro Advanced"
	tell database "databasename"
		tell table "layoutname"
			tell window 1
				set therequest to create new request
				set data of field "ID" of therequest to ID-number
			end tell
		end tell
	end tell
end tell

Any help would be greatly appreciated - I think it should work this way. I can call the script out of iCal by text
which I can send out of filemaker when I make the todo at the end of the notefield. Then I only have to select it and right-click open URL.

Have a great drift into 2007 - Christoph

Its working - with the help of StefanK from Switzerland I got that script and now I have a great connection between iCal and Filemaker!!

tell application “iCal” to activate
tell application “System Events”
tell process “iCal”
tell window 1
set a to some row of outline 1 of scroll area 1 whose selected is true
set selectedToDo to value of text field 1 of a
on error
display dialog “No todo is selected” buttons {“OK”} default button 1 with icon stop
end try
end tell
end tell
end tell
set flag to false
tell application “iCal”
repeat with c in calendars
if (count todos of c) > 0 then
repeat with t in todos of c
if summary of t is selectedToDo then
set theSelection to last word of (get description of t)
set flag to true
exit repeat
end if
end repeat
end if
if flag then exit repeat
end repeat
end tell
tell application “FileMaker Pro Advanced”
create request
set cell “ID” of request 1 to theSelection
end tell