Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Vorlage] Blockly - Beliebiges Zeichen im Text tauschen

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    [Vorlage] Blockly - Beliebiges Zeichen im Text tauschen

    This topic has been deleted. Only users with topic management privileges can see it.
    • David G.
      David G. @newBroker last edited by

      @newbroker

      Ja,

      wird benötigt.
      Da steckt die haupt Funktion und Logik vom Skript drinnen.
      Darauf greift der linke Teil während der Verarbeitung zu.

      N 1 Reply Last reply Reply Quote 0
      • N
        newBroker @David G. last edited by

        @david-g

        Dankeschön 🙂

        1 Reply Last reply Reply Quote 0
        • jahnbes
          jahnbes @rantanplan last edited by

          @rantanplan

          Danke, hat mir sehr geholfen!

          R 1 Reply Last reply Reply Quote 0
          • R
            RandyAndy @jahnbes last edited by

            Hi,

            ich finde das Skript ja cool und hätte es wahrscheinlich nicht hinbekommen. Da hat jemand richtig Arbeit reingesteckt.
            Ich habe mich auch schon geärgert, dass das nicht im Blockly abgebildet ist, insb. da Javascript das als Boardmittel mitbringt (wie eigentlich jede Programmiersprache).

            Hier mal ein Link wie ich das gemacht habe:
            https://forum.iobroker.net/topic/47645/replace-funktion-in-blockly?_=1637252488203

            Vielleicht auch ein Ansatz für den ein oder anderen

            Andreas

            rantanplan 1 Reply Last reply Reply Quote 0
            • rantanplan
              rantanplan @RandyAndy last edited by rantanplan

              @randyandy sagte in [Vorlage] Blockly - Beliebiges Zeichen im Text tauschen:

              Hi,

              ich finde das Skript ja cool und hätte es wahrscheinlich nicht hinbekommen. Da hat jemand richtig Arbeit reingesteckt.
              Ich habe mich auch schon geärgert, dass das nicht im Blockly abgebildet ist, insb. da Javascript das als Boardmittel mitbringt (wie eigentlich jede Programmiersprache).

              Ist schon einige Zeit her. Damals gab es noch keinen Js-Block.

              R 1 Reply Last reply Reply Quote 0
              • R
                RandyAndy @rantanplan last edited by RandyAndy

                @rantanplan

                Alles gut, wie gesagt finde es ja cool das man es überhaupt mit Blockly programmiert bekommt. Keine Frage: Hut ab für das Skript.
                Und vielleicht braucht man (hoffentlich) irgendwann meine Krücke auch nicht mehr. Eigentlich gehört dies Funktion ins Blockly, alles andere ist Murks.

                Andreas

                rantanplan 1 Reply Last reply Reply Quote 0
                • rantanplan
                  rantanplan @RandyAndy last edited by

                  @randyandy sagte in [Vorlage] Blockly - Beliebiges Zeichen im Text tauschen:

                  @rantanplan
                  Und vielleicht braucht man (hoffentlich) irgendwann meine Krücke auch nicht mehr. Eigentlich gehört dies Funktion ins Blockly, alles andere ist Murks.

                  Andreas

                  Alles gut. Bin ganz Deiner Meinung.
                  Ist aber leider so, dass hier Blockly ganz, ganz,.... zuletzt kommt.

                  Grüße

                  1 Reply Last reply Reply Quote 0
                  • David G.
                    David G. last edited by David G.

                    Hallo,

                    ich habe glaube noch einen Bug im Skript gefunden.

                    Ich habe einen Text wo nach dem Komma die Leerstellen fehlen (Wird so von einem Adapter geliefert.).

                    Habe mir also gedacht ich suche nach "," und ersetze es mit ", ".

                    Leider führt dieser Vorgang zum Absturz der Javascript Instanz.

                    rantanplan 1 Reply Last reply Reply Quote 0
                    • rantanplan
                      rantanplan @David G. last edited by

                      @david-g sagte in [Vorlage] Blockly - Beliebiges Zeichen im Text tauschen:

                      Hallo,

                      ich habe glaube noch einen Bug im Skript gefunden.

                      Ich habe einen Text wo nach dem Komma die Leerstellen fehlen (Wird so von einem Adapter geliefert.).

                      Habe mir also gedacht ich suche nach "," und ersetze es mit ", ".

                      Leider führt dieser Vorgang zum Absturz der Javascript Instanz.

                      Hallo

                      Damit generierst Du eine Endlosschleife!!!
                      Der Text wird bei jedem Durchgang immer von vorne bis hinten durchsucht.
                      Suche "," und tausche mit ", " findet somit kein Endeund dann steigt die Instanz irgendwann aus.

                      Tausche das Komma zuerst mit einem Semikolon und dann das Semikolon durch ", ".

                      David G. 1 Reply Last reply Reply Quote 1
                      • David G.
                        David G. @rantanplan last edited by

                        @rantanplan

                        Das klingt irgendwie logisch.... 🤣

                        1 Reply Last reply Reply Quote 0
                        • R
                          RkcCorian @rantanplan last edited by

                          @rantanplan Super, danke! Hab genau sowas gesucht. 🙂

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          368
                          Online

                          31.6k
                          Users

                          79.5k
                          Topics

                          1.3m
                          Posts

                          blockly template
                          13
                          70
                          11268
                          Loading More Posts
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes
                          Reply
                          • Reply as topic
                          Log in to reply
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                          The ioBroker Community 2014-2023
                          logo