Sorted it with the help of my old pals, try and catch.
Been out of the game for a couple of months. Rust sets in quickly!
1 person found this helpful
I think if you check the page(s) where it fails on, you might find some groups. As I recently learned on this very forum, both the group itself and all of its contents are included into allPageItems.
You might be able to remove the try..catch if you first check the 'current' settings for the color. It should be 'undefined' in a mixed setting. (I'm not sure if it's worth removing try..catch -- the script might run just a little bit faster. But I'm a stickler for details.)
Thanks for the reply, Mr J, I'll be getting back to this next week. I've had the fun part: having the idea and making it work. Now I'm going to tighten it up and make it work consistently. While I'm at it I'll experiment along the lines you suggested. It'll be good to get a handle on how to deal with groups. Some of our designers seem to act under the assumption that Mr Clumsy is going to be the next person to open their page, so they create grouped and locked fortresses! I'm their worst nightmare, Mr Demolition Man...