Learn how to link scripts to variant sets in VRED.
For additional information on scripting, see the Working with Scripts.