使用嵌入式 Applescript 和全局字段修复 filemaker 脚本 [英] Fixing a filemaker script with Embeded Applescript and Global Field
问题描述
在@Chuck 的大量帮助下,我编写了这个 filemaker 脚本,它应该在容器字段中找到相关的 PDF 附件并将它们导出到一个临时文件夹,然后触发一个将打开 & 的applescript.使用 adobe acrobat 打印文档.
With a great deal of help from @Chuck I have written this filemaker script which is supposed to find related PDF attachments in container fields and export them to a temporary folder then trigger an applescript which will open & print the documents using adobe acrobat.
不幸的是,该脚本无法运行,尽管我使用了脚本调试器并尝试遵循建议,但我仍然遇到困难.任何能准确告诉我哪里出错的帮助将不胜感激.
Unfortunately the script will not work and although I have used script debugger and tried to follow advice I am still having difficulty. Any assistance in telling me exactly where I'm going wrong would be appreciated.
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]
使用脚本调试器时出现以下错误...
Using Script Debugger I get the following errors...
在脚本步骤,导出字段 - 错误:(VARIABLE FILE NAME.. 无法在此磁盘上创建.使用不同的名称在磁盘上腾出更多空间.
On Script Step, Export Field - Error: " "(VARIABLE FILE NAME).. could not be created on this disk. use a different name make more room on the disk.
执行 AppleScript 步骤: 错误:未找到对象 &错误:未知错误:-1728
On Perform AppleScript Step: Error: Object not found & Error: Unknown Error: -1728
推荐答案
这是在服务器上(通过计划)还是在客户端计算机上执行?
Is this being executed on the server (via a schedule) or on the client computer?
您是否确认在临时路径中确实正确设置了目录权限?
Have you verified that the directory permissions are actually set correctly in the temporary path?
您是否尝试过使用 Get ( DocumentsPath )
而不是临时路径,只是为了验证?
Have you tried using Get ( DocumentsPath )
instead of the temporary path, just to verify?
这篇关于使用嵌入式 Applescript 和全局字段修复 filemaker 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!