Clock - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9) +--- Thread: Clock (/showthread.php?tid=1730) |
Clock - paalidar - 19.11.2018 Hi, Found an answer for this question some weeks ago, but can't find it any more. I got a script wich write time (hour, min & sec) to a group address. How can I make it show only hour & min? RE: Clock - admin - 20.11.2018 You need to use string/text data type, but this way it will be a read-only value. Code: time = os.date('%H:%M') Or you can use SVG image, which will display client time: https://forum.logicmachine.net/showthread.php?tid=1634 RE: Clock - paalidar - 20.11.2018 (20.11.2018, 07:48)admin Wrote: You need to use string/text data type, but this way it will be a read-only value. Can't make this work... Something I'm doing wrong for sure... Data type "250 byte String" I have to use? All I get is an empty value. RE: Clock - admin - 20.11.2018 What kind of script have you created? You need to create a resident script with at least 1 second sleep time. RE: Clock - paalidar - 20.11.2018 (20.11.2018, 11:24)admin Wrote: What kind of script have you created? You need to create a resident script with at least 1 second sleep time. Resident script, 1 second sleep time time = os.date('%H:%M') grp.checkwrite('32/1/8', time) Some how made it work, but the object just keeps on flashing, 1 sec on - 1 sec off RE: Clock - admin - 20.11.2018 Check if any other script is writing there. You can search all scripts in Scripting > Tools > Print script listing. RE: Clock - paalidar - 20.11.2018 Thank you! Another one, can I auto close widgets after som seconds if there is no user action? RE: Clock - Daniel - 20.11.2018 (20.11.2018, 16:21)paalidar Wrote: Thank you! Check this, it is kind of what you are looking for https://forum.logicmachine.net/showthread.php?tid=275&pid=1254#pid1254 RE: Clock - Erwin van der Zwart - 20.11.2018 Hi, Here is a full working sample to auto close widgets based on the back to startpage JS script: Code: $(function(){ Erwin |