Hey script kiddies!
I know, I know... It's been a while. Hopefully this will make up for some of the lonely feelings you've had to suffer through.
Behold my newest creation: exportLayers.jsx
It will export as many images as you have layers in an .ai document.
And provides the option for you to process multiple open documents or just the current active document.
You can batch export images like this as PNG, JPG, or GIF with a single click:
just by creating a layer structure like this:
Make sure your static layers are locked.
All unlocked layers will be exported, regardless of visibility.
Layers that are both locked AND hidden will be ignored completely.
....and if that weren't cool enough...
The script also auto-generates a production script into your chosen images export directory, so if you ever need to re-run the batch, just re-open all the same source files, double click the .jsx file in your image export directory, and it will skip the dialog and re-export all the images with the same settings.