使用Embedded Applescript和Global Field修复文件制作器脚本

时间:2014-06-25 17:31:37

标签: applescript acrobat filemaker

在@Chuck的大量帮助下,我编写了这个文件制作者脚本,该脚本应该在容器字段中找到相关的PDF附件,然后将它们导出到一个临时文件夹,然后触发一个打开的文件。使用adobe acrobat打印文档。

不幸的是,脚本不起作用,虽然我使用了脚本调试器并试图遵循建议但我仍然遇到困难。任何协助告诉我我出错的地方都会受到赞赏。

Go to Related Record [Show only related records; From table: “Attachments”; Using layout: “Attachements Report" (Attachments); New window]
Enter Find Mode []
Constrain Found Set [Restore]
Sort Records [Restore; No dialog]
#
#After finding the related attachments and constraining them to the specific type we rename and export them to the desktop
#
Go to Record/Request/Page [First]
Loop
Set Variable [SPath; Value:"fi|emac:" & Get ( TemporaryPath ) & Attachments::Record number &"-' & Attachment Type List 2::Prefix_z & Lien::Lien_lD_z]
Set Variable [SASPath; Valuei"/' & Substitute( SPath; "filemac:" & Cet( SystemDrive )1  )]
Set Field [Attachments::g_app|escript_parameter; $ASPath]
Export Field Contents [Attachments::file_c; “SPath"]
Perform AppleScript ['set _pdf_path to contents of cell "g_applescript_parameter" of current layout batchprint(_pdf_path) on batchprint(mycurrentfile) tell application ‘Adobe Acrobat Pro" activate —- bring up acrobat open alias mycurrentfile “'_*]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Close Window [Current Window]

使用脚本调试器我收到以下错误......

On Script Step,Export Field - 错误:“"(VARIABLE FILE NAME)..无法在此磁盘上创建。使用不同的名称在磁盘上腾出更多空间。

开启执行AppleScript步骤:错误:找不到对象&错误:未知错误:-1728

1 个答案:

答案 0 :(得分:0)

这是在服务器上(通过时间表)还是在客户端计算机上执行?

您是否确认在临时路径中实际正确设置了目录权限?

您是否尝试过使用Get ( DocumentsPath )代替临时路径,只是为了验证?