Integrating scripts question for toxic exporter. Help needed


I am writing an export script for the physically accurate GI renderer toxic I have written a basic export script incorporating some of the .obj export code from I have now written a seperate GUI script which makes the setting.xml file needed by the exporter.

In the GUI script I need to effectively run the other script when a certain GUI event occurs. How do I do this within a single script (if possible)? I tried defining the whole of the export script as a function but that failed miserably.

Please help if you can. I would like to release a new version of my script soon.