PDA

View Full Version : compose via AppleScript


puschteblume
July 21st, 2009, 08:57 AM
Hello
The dictionary of FusionPro shows a command which could be invoked. The syntax that the dictionary shows is:

compose v : Compose a document
compose alias : Format file to compose
[input alias] : Input file containing data for the composition
config alias : Config file to use
output file specification : Output file to create
→ integer : Return code from composition, 0 is success

I tried to invoke the compose command but always got errors. For me it isn't really clear how the syntax should be. Could anybody provide an example?
Thanks Heiko

chads
July 21st, 2009, 01:57 PM
I haven't seen this in the Doc, but I am highly interested in hearing someone putting it into use.

Would this accomplish the same thing as a batch process? We have a client who likes to break out inserts by a cell code and we can often have 70 files that have to be ran against the same template. I would be a huge time saver to be able to "compose a folder."

Dan Korn
July 23rd, 2009, 04:23 PM
Exactly what errors are you getting? This works for me:
tell application "FusionPro"
activate
compose alias "Macintosh HD:Applications:Printable:FusionPro:Tutorial:Frodo Travel:frodo.dif" input alias ¬
"Macintosh HD:Applications:Printable:FusionPro:Tutorial:Frodo Travel:frodo-InstanceData.txt" config alias ¬
"Macintosh HD:Applications:Printable:FusionPro:Tutorial:Frodo Travel:frodo-InstanceData-Output.cfg" output ""
end tellAlso, you have to have a FusionPro Server (batch) license for this to work. It won't work with a Desktop license. You can find out what kind of license you have by choosing "About FusionPro" from the menu. If it doesn't include the word "Server," then this won't work.