Automation in Machining

Hi, 
Does anyone have an example of script in manufacturing (VBA, VSTA C# or .net) ?
Thanks,

Arnaud