Filemaker Pro 12-Applescript-找不到对象1728

Filemaker Pro 12-Applescript-找不到对象1728,applescript,filemaker,Applescript,Filemaker,编辑:更多信息-Filemaker Pro 12,MacOSX Mavericks。另外:我将全局变量放在布局上,以确保它们设置正确,并检查文件夹以确保文件存在 我有一个带有本地applescript的filemaker脚本,它在一段时间后停止工作。单击filemaker容器中的照片时会触发脚本,并使照片在预览中打开。找不到对象时出错-未知错误1728 tell application "Filemaker Pro" activate tell window "Deals_Platform

编辑:更多信息-Filemaker Pro 12,MacOSX Mavericks。另外:我将全局变量放在布局上,以确保它们设置正确,并检查文件夹以确保文件存在

我有一个带有本地applescript的filemaker脚本,它在一段时间后停止工作。单击filemaker容器中的照片时会触发脚本,并使照片在预览中打开。找不到对象时出错-未知错误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
旧脚本(这也不起作用)


很抱歉,要恢复一个旧线程,但是mcgrailm,FileMaker绝对不要求字段位于当前布局或任何布局上,实际上是为了计算引用它们。它需要在布局上才能使转到字段转到对象脚本步骤正常工作,但这只是常识:您不能选择不存在的内容。

您是否在布局模式下运行脚本?我认为在布局模式下,脚本无法访问单元格的数据。我只是在浏览模式下运行脚本。你能解释一下“当我从浏览模式切换到布局模式时,它似乎停止工作。”我不确定它是如何停止工作的。今天我回到时光机器,发现了一个仍然有效的文件。脚本不同,我将旧脚本复制到了新文件中,但没有任何帮助。新文件上的脚本不同的原因是我试图解决错误。我会尝试让旧文件也打破,但我还没有能够。关于旧脚本,请参见上面的内容。为了清楚起见,该脚本自上次崩溃后再也没有开始工作。
  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