This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LM master-slave script name constructor
#1
Hello,
I would like to know if there is a way how to get a list of script names that we need if we want to use the functionality of two Logicmachines in master-slave mode. We have ~60 scripts and need to enable/disable them via command script.enable('scriptname'). So rather than typing it, I would like to get a list of them so we can work with it faster&more reliable.
Thank you in advance.
Reply
#2
You can add all required scripts to the same category and enable/disable them all like this:
http://openrb.com/docs/lua.htm#script.categoryenable
Reply
#3
Thanks for quick reply, but what if we already use categories for other script control? Could you in future firmwares implement multiple category names above scripts like multiple tags above objects?

A little follow up:

I wanted to make my task easier, so I did the following: erased all the category names, and tried this:

script.categoryset('', false)

Worked ok, every script with no category was disabled this way, BUT (!!) if you have also nothing in description field, such script would be ignored and would not be enabled/disabled.
Reply
#4
Description field should not affect category. Can you send us your backup via e-mail for further inspection?
Reply
#5
backup file sent
Reply
#6
Thanks for you backup, it turns out that in some cases category can be either an empty string or NULL. That's why script.categoryset was not working correctly for all scripts for you. This will be fixed in next firmware release. As a work-around for now you can edit/save each script parameters (not the script source), this will set category to an empty string.
Reply


Forum Jump: