编辑:更多信息 - Filemaker Pro 12,Mac OSX Mavericks。另外:我已将全局变量放在布局上以确保它们设置正确,并且我已检查文件夹以确保文件存在。
我有一个带有本机 applescript 的文件制作器脚本,一段时间后停止工作。单击文件制作器容器中的照片时会触发该脚本,并导致照片在预览中打开。错误是找不到对象 - 未知错误 1728
tell application "Filemaker Pro"
activate
tell window "Deals_Platform"
go to layout "Equipment Detail"
set photoPath to (get data of cell "_global_photo_path" of layout "Equipment Detail" of current record)
set photoFolder to (get data of cell "_global_photo_folder" of layout "Equipment Detail" of current record)
end tell
end tell
tell application "Finder"
activate
open folder photoFolder of folder "PRODUCTS_PHOTOS" of folder "CONTACT" of folder "Files" of folder "Customer Database" of folder "Business Files" of folder "PhD Assets" of folder "J Files" of folder "Documents" of folder "J" of folder "Users" of startup disk
open document file photoPath of folder photoFolder of folder "PRODUCTS_PHOTOS" of folder "CONTACT" of folder "Files" of folder "Customer Database" of folder "Business Files" of folder "PhD Assets" of folder "J Files" of folder "Documents" of folder "J" of folder "Users" of startup disk
close folder photoFolder of folder "PRODUCTS_PHOTOS" of folder "CONTACT" of folder "Files" of folder "Customer Database" of folder "Business Files" of folder "PhD Assets" of folder "J Files" of folder "Documents" of folder "J" of folder "Users" of startup disk
end tell
旧脚本(这也不起作用)
tell application "FileMaker Pro"
activate
set photoPath to (get data of cell "_global_photo_path" of current record)
set photoFolder to (get data of cell "_global_photo_folder" of current record)
end tell
tell application "Finder"
activate
open document file photoPath of folder photoFolder of folder "PRODUCTS_PHOTOS" of folder "CONTACT" of folder "Files" of folder "Customer Database" of folder "Business Files" of folder "PhD Assets" of folder "J Files" of folder "Documents" of folder "J" of folder "Users" of startup disk
end tell