欢迎图片

Changes for page Lua Script

Last modified by Devin Chen on 2025/11/10 16:04

From version 9.1
edited by xingzhi lin
on 2025/10/31 11:32
Change comment: There is no comment for this version
To version 10.1
edited by xingzhi lin
on 2025/10/31 11:55
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8008,28 +8008,58 @@
8008 8008  
8009 8009  == chart.setAlarmBtnSpacing ==
8010 8010  
8011 -**Prototype : **user_secure.usersecure_getInfo()
8011 +**Prototype : **chart.setAlarmBtnSpacing(partname, spacing)
8012 8012  
8013 -**Function: **Connect to a DB file.(If the file does not exist)
8013 +**Function: **Set the spacing between new alarm buttons
8014 8014  
8015 8015  **Parameters**:
8016 8016  
8017 -* dbFilePath (string): Full path to the DB file to connect to (create)
8017 +* (((
8018 +partname(string): Component name
8019 +)))
8020 +* (((
8021 +spacing(int): Button spacing (unit: px (pixels))
8022 +)))
8018 8018  
8019 8019  **Return: **
8020 8020  
8021 -* Success: database object
8022 -* Failure: Returns nil and error.
8026 +* Success: User data table
8027 +* Failure: Returns nil
8023 8023  
8024 8024  **Example**
8025 8025  
8026 8026  {{code language="LUA"}}
8027 -sql = require "Luasqlite" -- Introducing the lua libraries  
8028 -env = sql.sqlite3() -- Get the environment class
8032 +chart.setAlarmBtnSpacing("1_ALM_0", 5)
8029 8029  {{/code}}
8030 8030  
8031 8031  == chart.setAlarmBtnScale ==
8032 8032  
8037 +
8038 +**Prototype : **chart.setAlarmBtnScale(partname, scale)
8039 +
8040 +**Function: **Set the new alarm button size scaling
8041 +
8042 +**Parameters**:
8043 +
8044 +* (((
8045 +partname(string): Component name
8046 +)))
8047 +* (((
8048 +scale(double): Scaling factor, default is 1, range [0.1, 5]
8049 +)))
8050 +
8051 +**Return: **
8052 +
8053 +* Success: True
8054 +* Failure: False
8055 +
8056 +**Example**
8057 +
8058 +{{code language="LUA"}}
8059 +chart.setAlarmBtnScale("1_ALM_0", 1.5)
8060 +{{/code}}
8061 +
8062 +
8033 8033  == chart.setFormulaBtnSpacing ==
8034 8034  
8035 8035  == chart.setFormulaBtnScale ==