У меня есть база данных FileMaker Pro 12 с полем внешнего файла. Я хотел бы использовать applescript для создания записей и заполнения этого поля автоматически. Я уже пробовал несколько вещей, но получаю соответствующие ошибки.Создать внешнюю ссылку на файл в FileMaker Pro с applescript
set theFilePath to choose file with prompt "Please select your file:"
tell application "Finder"
set theFile to file theFilePath
end tell
tell application "FileMaker Pro"
set theRecord to create new record at database "MyDatabase"
tell theRecord
set cell "file" to theFile
end tell
end tell
Результаты в:
error "Can’t make «class docf» \"movie.MOV\" of «class cfol» \"compressed\" of «class cdis» \"Drobo\" of application \"Finder\" into the expected type." number -1700 from «class docf» "movie.MOV" of «class cfol» "compressed" of «class cdis» "Drobo"
Изменение set
линии либо из них:
set cell "file" to theFilePath
set cell "file" to (theFile as alias)
Результаты в:
error "FileMaker Pro got an error: Can’t set cell \"file\" of record ID 276.0 of table \"MyDatabase\" of database \"MyDatabase.fmp12\" to alias \"Drobo:compressed:movie.MOV\"." number -10006 from cell "file" of record ID 276.0 of table "MyDatabase" of database "MyDatabase.fmp12"