0

编辑:更多信息 - 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
4

1 回答 1

0

很抱歉复活了一个旧线程,但是 mcgralm,FileMaker 绝对不需要字段位于当前布局(实际上也没有任何布局)上,以便计算引用它们。它需要在布局上才能使“转到字段”或“转到对象”脚本步骤起作用,但这只是常识:您不能选择不存在的东西。

于 2014-08-21T18:19:54.350 回答