Adding scripts to a menu



  • On 07/07/2015 at 08:21, xxxxxxxx wrote:

    I am trying to add specific scripts to a menu, I can add the script using the ID cinema gives it by default, but this is not a locked ID and can change. Is it possible to predefine an ID for a script similar to registering a plugin?

    EDIT:

    Just discovered GetCommandName(_<_gs_>_) so now I can just iterate through a range of id's and add the script if it matches a name. Though it would still be nice to lock an ID to a script.



  • On 08/07/2015 at 02:14, xxxxxxxx wrote:

    Hello,

    I just want to make sure we understand what you are talking about: do you talk about scripts from the Script manager? And how exactly do you want to add a script to a menu?

    Best wishes,
    Sebastian



  • On 08/07/2015 at 06:30, xxxxxxxx wrote:

    Yes, scripts from the script manager. (If there is another way to load scripts into cinema that would be nice.)

    What I ended up doing is iterating through the 600000000+ ID range and checking the names against preset lists and sort them into subgroups accordingly.

    It would be nice to have a way to identify a script without using the name. If the name gets changed, then it won't get added to the menu. I would have to check the contents of the script to counter act that.



  • On 08/07/2015 at 10:43, xxxxxxxx wrote:

    Hello,

    indeed, the IDs of the scripts are created dynamically and may change every time Cinema starts. You have to use the script name to identify a script. I think one can assume that when the script name is different, this is because the content is different.

    Best wishes,
    Sebastian


Log in to reply