Jump to content
Server Maintenance This Week. ×

Save PDF on FM Server - through Applescript?


This topic is 5201 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 by Guest
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

This topic is 5201 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.