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.

Auto-generate widgets in Mozaic/Touch
#1
Hi

I was wondrering, is there a way to generate widgets in Mozaic/touch by scripting? 
My plan is to create a test-functionality in a SL that I will use in projects during testing. That means that the SL have a new project every now and then.

For this I want to create widgets in touch by script. Is there a way to emulate the widget ceration?
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply
#2
Hi
Backup Mosaic and look in to the json file. All is defined there. Each widget must have unique ID.
BR
------------------------------
Ctrl+F5
Reply
#3
Config is saved to storage db in JSON form. You can get/set it like this, storage.get/storage.set cannot be used because of different data format.
Code:
config = storage.exec('get', 'mosaic:config:0')
storage.exec('set', 'mosaic:config:0', config)
Reply
#4
OK, I will have a look at it.

Thanks!
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply
#5
Took a quick look. It looks like something we can do automatic.

One thing though; is this the ID; "uid":"f44205877ae73ca232650e06833db82c"?
Is this something I can generate myself or must this be added by LM/SL?
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply
#6
I think uid format does not matter, just that every widget must have a different uid string
Reply
#7
(23.01.2019, 13:46)admin Wrote: I think uid format does not matter, just that every widget must have a different uid string

OK, great! Then I will try to make something.

Thanks for help!
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply


Forum Jump: