Photoshop Group Manipulation...

Hello…
I am looking to use Applescript to start a series of Actions in Photoshop without the user needing to do anything other than run the script…

My issue…
The Action requires the any Layer Groups to be expanded, then each layer group activated before the action will work. The action then runs on each group individually.

Was hoping to automate that part.

Thanks for any help…