Script.create? - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Script.create? (/showthread.php?tid=1829) |
Script.create? - FatMax - 12.01.2019 I’m increasingly reusing different scripts in projects and as some may know, it might be a tedious effort to create the different scripts and group addresses on each project. I’m just wondering if there is a plan to create a sort of script.create function in the software in the near term? RE: Script.create? - Daniel - 14.01.2019 Hi Why would you want this? BR RE: Script.create? - Thomas - 14.01.2019 I think the idea is clear. If you make a new visualisation for block of N buildings where all houses are the same but group addresses differs (because you use a numbering scheme) then you want to create only one visualisation and copy it N times. This tool is heavily missing at LM. What I suggested (unsuccessfully) was a set of scripts which parse the whole project to (many) Excel sheets. A system implementator can bulk modify what he wants and re-create the project back by another script. RE: Script.create? - FatMax - 16.01.2019 Thomas use case makes sense, but for me personally it would allow me to build one install script for repetitive functions that depends on event and resident/scheduled scripts and different group addresses that needs to be created. It would also allow me to install functions remotely from a server and perhaps update scripts with a script.insert command. I’m sure many users would benefit from this sort of functionality. RE: Script.create? - Jayce - 17.01.2019 I like the idea of it, I'm sure it would be very useful. RE: Script.create? - admin - 17.01.2019 Here's an example of how to create script from another script: Code: data = { RE: Script.create? - FatMax - 18.01.2019 Thanks! RE: Script.create? - epps - 18.04.2020 (17.01.2019, 12:59)admin Wrote: Here's an example of how to create script from another script:Hey guys, how can i insert a three or four line code there ? RE: Script.create? - admin - 19.04.2020 Like this: Code: str = [[multi RE: Script.create? - epps - 19.04.2020 (19.04.2020, 09:27)admin Wrote: Like this:Thanks Admin. RE: Script.create? - JohnTH - 17.08.2022 (17.01.2019, 12:59)admin Wrote: Here's an example of how to create script from another script: Hi, I am using this for for 'autosetup' LM with a startup (init) script and it has been very useful. Is there any simular way to add functions to 'common functions' (or overwrite the file) ? RE: Script.create? - admin - 18.08.2022 Use this: Code: script.checkuserlib(common_functions_code) RE: Script.create? - JohnTH - 18.08.2022 (18.08.2022, 06:35)admin Wrote: Use this: Works great, thanks! RE: Script.create? - FatMax - 13.09.2023 Onto the next question; Is it also possible to create user libraries with a script? RE: Script.create? - admin - 14.09.2023 You can use webrequest library in latest firmware to emulate web UI requests: Code: webrequest = require('webrequest') RE: Script.create? - FatMax - 15.09.2023 Thank you again for the great help. Is this web request library documented anywhere? I would like to also create new Modbus-profiles and this would be very helpful. I guess search is my friend: https://forum.logicmachine.net/showthread.php?tid=4425 |