Passing parameters from Rev to Applescript
Michael
mpease at lawandpolitics.com
Tue Dec 22 18:45:38 EST 2009
Here's a quick FileMaker to Revolution via Applescript example. Uses
FileMaker Pro 10, Revolution 3.5, and OS 10.5.
tell application "FileMaker Pro"
tell window 1
tell layout 1
set d1 to ((get data cell "theData1" of current record) as text)
-- d1 now contains "tic"
set d2 to ((get data cell "theData2" of current record) as text)
-- d2 now contains "toe"
-- specify field names on Rev card
set fieldTarget1 to "t1"
set fieldTarget2 to "t2"
end tell
end tell
tell application "Revolution"
activate
do script ("put " & d1 & " & cr & " & "tac" & " into cd field " &
fieldTarget1)
-- result in field "t1" is two lines, "tic" and "tac"
do script ("put " & d2 & " into cd field " & fieldTarget2) --
-- result in field "t2" is one line, "toe"
-- do script ("put " & d2 & " into cd field id " & 1006) -- would also
work using field id
end tell
end tell
--m
More information about the use-livecode
mailing list