wonfuji Posted October 6, 2009 Posted October 6, 2009 Hi This all started a week or so ago when I was reading the "Appending to PDF from Container Field" on a Tech Talk thread and a client asked about something that resonated with that thread. The client has a db table with a container field that references a number of promotional/training PDFs on their server. They would like to eMail from Filemaker (v10 on Macs) to a client and attach a single PDF file that contains merged/appended PDFs that they feel would be useful for the client. We can get all the PDF names into a simple portal. They can then check off the PDFs that they require. With 20 or more PDF choices there are a lot of possibilities. We can then search for the requested PDFs (unchecking when found) and do a loop to export field contents to the temp directory. The PDFs are named PDF1, PDF2 etc. We can then to a SaveAsPDF to create a cover page with client info and a list of the "attached" PDFs - actually merged/appended - name is "Cover.pdf". So now we have everything that now they require merging. This little utility does that JoinPDF - http://freshmeat.net/projects/joinpdf/ It requires an OS install but does as advertised. This command in Terminal: joinPDF /Users/stephen/Desktop/PDF_Follies/joined.pdf /Users/stephen/Desktop/PDF_Follies/PDF_Five.pdf /Users/stephen/Desktop/PDF_Follies/PDF_Four.pdf /Users/stephen/Desktop/PDF_Follies/PDF_One.pdf will merge, in order, PDF_Five then PDF_Four then PDF_One into Joined.pdf. Great. I found how to save this as shell script and can even run it in Terminal. And it works. This is where the trouble starts. 1. I would like to execute the shell script from Filemaker. 2. I would like to be able to dynamically build the code in Filemaker and then have it run in the shell. 3. My Unix skills barely extend past "ls -l", actually they don't go past. 360Works Scriptmaster runs shell scripts but I am absolutely clueless as to how to even starting to consider going about that. I have acquired "Take Control of the Mac Command Line with Terminal (1.0.2)" and Apple's "ShellScripting" but both books seem to assume that I am keen to relinquish my mouse for the joy of incessant typing. And that I really want to take control of the command line. I don't at all want control of the command line at all - I'd just like it to do me a small favour. So I think my question then becomes this. Can I dynamically build a shell script that I can execute in Scriptmaster? And if so, how do I make this work in FMP? Stephen
Valentin Posted October 22, 2009 Posted October 22, 2009 Sorry if my answer is too simplistic. But you would concatenate your shell commands in a text field and then pass that value to SM's runShellScript module as a parameter. Please feel free to call or post here with more questions.
Recommended Posts
This topic is 5522 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 accountSign in
Already have an account? Sign in here.
Sign In Now