If [Template::ID = 1 ]
Perform Script [Script for Template 1 here]
Else IF [Template::ID = 2 ]
Perform Script [Script for Template 2 here]
but in many cases, there are less cumbersome alternatives via script parameters and such, but those options require a more detailed description of how each of these "Record specific" scripts differ from each other.
Each Record in the Table::Template contain the parameters to be called by the associated script. and all the scripts are written individually for each Template.
ie Record 1 = Script 0001 . Record 2 =Script 0002, and so on
This is the only way I can proceed as the scripts are calling GraphicsMagick functions to draw vector shapes.
On the sample you provided would I have to add to the calculation each time I create a new record for newTemplate?
Yes, but it may not be your only alternative.
You might be able to set up a script that loops through a list of function calls for GraphicsMagick and calls the specified function, passing the specified data to it.
Such an "interpreter" script could then service all your template records simply by passing the script a different list.
Yes I looked at what you decribe as an "interpreter" script.
The only problem is this would scripting at a level far above my abilities! though It wont stop me trying at some point.
I think your first suggestion is the way to go at the moment.
It would be a great feature if scripts could be "named" just like objects and be able to be called from a table::ID
Many Thanks again