February 1, 201015 yr Does anyone know of a solution yet to create a PDF as part of a server scheduled script? I'm trying to send out an automatic traffic report in PDF format. All is compatible, I'm just not sure how to save my found set as a PDF when running without client FM. Any input much appreciated! Edited February 2, 201015 yr by Guest
February 1, 201015 yr Hi I recently did something similar by using the get (temporary path) function, I saved my Pdfs there and inserted them into a container field ready to be emailed. Not sure if thats what you mean though.
February 2, 201015 yr Author That's a start, but it doesn't solve the problem of creating a PDF. If you turn on compatibility info for server in script editor, you will see that the "Save as PDF" step is grey - not compatible. I'm wondering if someone found a work around to creating a PDF on the server?
February 2, 201015 yr Author Ah, you mean run an FMP client on the server as well? What I'm missing then is the possibility to run the script at a certain time each (week)day. It seems it's either having a scheduled server script, or a PDF... or am I missing something?
February 2, 201015 yr Basically you can use a dedicate client Pro version to run the script. You can have a local file on that machine scheduled to open at a certain time. That file would then run a script that references the data files on your server. After it creates the PDF, it would then exit the application.
February 2, 201015 yr Author I see, very interesting. That would have to be a system level script, I'm assuming?
February 2, 201015 yr Not necessarily.. Windows - a Scheduled event, repeating when you need Mac - a Cron entry with similar details
February 2, 201015 yr Author I do feel a bit like a moron... I really don't know much about system level scripting. Here's what I've tried: open '/Volumes/Macintosh HD/Sample.pdf' I saved this in a text-only file and had FM Server open it as a System level script. The response was "OK", but no file was opened. The file does exist in said location... http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=5496&p_created=1128546566 Edited February 2, 201015 yr by Guest
February 2, 201015 yr Author I've also just tried it with an AppleScript: tell application "Finder" activate open document file "Sample.pdf" of startup disk end tell Same result, FM Server says that the script execution is ok, but nothing happens (the document is not opened) Any ideas?
February 2, 201015 yr How about using an OnTimer script? Start it in an Open Script if get (accountname) = "Robot".
February 2, 201015 yr Author True, I could do that. I mean to be picky, but I do feel that a server script would be much more robust. What if someone accidentally closes the file? But if I can find out how to get an AppleScript started via server, I will go with your suggestion.
February 3, 201015 yr you are right: a server side script would be more robust, but some features are simply not supported server-side. So setting an FMP client robot machine is your easiest solution. To solve the issue of somone closing the file: take away keyboard and mouse so that you can only get to it remotely. Use whatever OS tools there are to schedule an OS-level script that would: - launch FM - open the hosted file - run an FM script routine - close the file - close FM So in between runs there would be nothing to go wrong or accidentally close. Remember that FM on Mac has extensive Applescript support and on Windows there is the ActiveX interface to talk to FM from the outside. If you have specific questions on OS-level scripts there are dedicated sections in FMforums on that...
Create an account or sign in to comment