There is one simple concept that you have not yet grasped. When you do grasp it (which will be very soon) you will scream with rage and frustration that you didn't get the hang of it sooner.
I get the impression that you understand how to use addaction to make a script start running. Is that true? Let's assume it is.
Do you understand how to use removeAction, so that you can make an action disappear from the action menu?
Assuming you do, all we are left with is the mysterious concept. It's this:-
In a script started by an addaction thing, you can remove the original action and also, if you wish, add new actions.
This process can be repeated in any way you want. So the scripts started by the new actions can remove these new actions and add another action which is exactly the same as the original one. Or a whole new set of actions.
That's it. If you know how to use addaction and removeaction, and you know how to make addaction make a script start, then you know everything required to make a cascading sequence of submenus.
If this post doesn't make sense (which is more than possible
) read it again. If it still doesn't make sense, highlight the bits that are gibberish and I'll explain it in a different way. It's one of these things that's unspeakably complicated till you see the light, then it's very straightforward.
The underlying problem is that you think you don't know how to do what you want, but in fact you do. You aren't missing any information. All you have to do is rearrange the stuff that's already in your head. :thumbsup: