2013-10-31 41 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絕對不需要到田地在當前的佈局上 - 實際上也不是任何佈局 - 用於引用它們的計算。它將需要在佈局上,以便轉到字段轉到對象腳本步驟工作,但這只是常識:您不能選擇不存在的內容。

相關問題