2013-10-31 38 views
0

编辑:更多信息 - Filemaker Pro 12,Mac OSX Mavericks。另外:我已将全局变量放在布局上,以确保它们已正确设置,并且已检查该文件夹以确保文件存在。Filemaker Pro 12 - Applescript - 找不到对象1728

我有一个filemaker脚本,原生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 
+0

你想在布局模式下运行脚本吗?我不认为脚本可以在布局模式下访问单元格的数据 – mcgrailm

+0

不,我只是从浏览模式运行脚本。 – user2939940

+0

你能解释一下吗?“当我从浏览切换到布局模式时,它似乎停止工作。” – mcgrailm

回答

0

对不起复活旧线程,但mcgrailm,的FileMaker绝对不需要到田地在当前的布局上 - 实际上也不是任何布局 - 用于引用它们的计算。它将需要在布局上,以便转到字段转到对象脚本步骤工作,但这只是常识:您不能选择不存在的内容。

相关问题