aboutsummaryrefslogtreecommitdiffstats
path: root/mode-button.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-06 15:28:55 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:27:15 +0100
commit4dd6bdef3185d154c5b28efa7075f50cdb990682 (patch)
tree27295980ee9b23ed770713da9cf0460fc124d55a /mode-button.rsc
parent52f54baea08184294825b24a43f1c21a45de265d (diff)
mode-button: drop main function, use :do with on-error
Diffstat (limited to 'mode-button.rsc')
-rw-r--r--mode-button.rsc8
1 files changed, 3 insertions, 5 deletions
diff --git a/mode-button.rsc b/mode-button.rsc
index 0cd9167..07788cb 100644
--- a/mode-button.rsc
+++ b/mode-button.rsc
@@ -11,8 +11,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global ModeButton;
@@ -78,6 +78,4 @@
$LogPrintExit2 debug $ScriptName ("Updating scheduler _ModeButtonScheduler...") false;
/system/scheduler/set $Scheduler start-time=[ /system/clock/get time ];
}
-}
-
-$Main [ :jobname ];
+} on-error={ }