In general, I would suggest not to write custom script based on the use of the fx_* commands.
These commands are specifically done for the plug-in, and are are likely to change quite often, when the plug-in filters are updated.
This is not the case for other commands, whose API remains relatively stable over time.
If you want to apply CLUT on your images, then why not use the more simple command map_clut ?
It is very simple to use and does basically the same thing as fx_simulate_film and fx_color_presets, but without all the ‘decorations’ needed for the user interface of the plug-in.