Illustrator 10--Preflight script

I am new to applescript. I ha ve dabbled in it isome over the years, but haven’t really gotten to deep into learning it.

I need a script that will do the following:

  1. open all of the illustrator files in a folder 1 by one and:

Remove all swatches accept for black, white and a spot (reflex blue)
Flatten the artwork and remove all the guides
Set black to overprint
Set white fills to not overprint
Save the doc and move on to the next one.

I am currently muddling through it, but any help is greatly appreciated!