🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Combining files?

    UIFlow
    5
    6
    9.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dclaar
      last edited by

      I would like to combine 2 m5f files, but I can't seem to find a way. Is this supported?

      liemphL 1 Reply Last reply Reply Quote 0
      • liemphL
        liemph @dclaar
        last edited by

        @dclaar As far as I know, it would be difficult to do that using the UiFlow platform. But you could try the following way using Visual Studio Code:

        1. Assume your m5f files are A.m5f and B.m5f.
        2. Open A.mf5 with UiFlow and go the python tab and copy your python code and save it to A.py.
        3. Do the same for B.mf5, save to B.py.
        4. Open Visual Studio Code, and combine your two python codes.
          Of course, you have to make sure which one (A or B) is the main program and you have to make "correction" when combining the two codes. But DO NOT EXPECT that your new combined python code can be opened and further modified by using UiFlow platform.
        1 Reply Last reply Reply Quote 0
        • world101W
          world101
          last edited by

          Beyond Compare would be another way to merge the files, allowing you to visually compare what code you want to keep from each file.

          1 Reply Last reply Reply Quote 0
          • D
            dclaar
            last edited by

            Thanks! I was hoping to merge the UiFlow code.
            The rest is kind of philosphical
            I keep trying to create something in this kind of drag-and-drop, just to see how it has progressed. And it really is nice for testing out a few lines just to see what happens.
            But I've always run into limitations, and dropped back into a text editor and a "real" language. (No offense to UiFlow intended).
            Besides, I can crank out Python in a fraction of the time it takes to drag around GUI elements. Particularly since it's my day job. But the allure of writing a program with blocks remains.

            1 Reply Last reply Reply Quote 0
            • S
              Serge
              last edited by

              Same problem, that's how i deal with it : i open boths m5f files in blocknote (windows) and do some copy paste in UIflow.
              And close to that problem, when i want to save from UIflow my python code, i copy from UIflow , paste it in blocknote and save it.
              Not really happy with that.

              1 Reply Last reply Reply Quote 0
              • C
                crami25
                last edited by

                @dclaar
                I'm using 2 techniques:

                1. Use Notepad++ as an editor. If you name your program *.py, it will highlite the code as in Blockly/Python. You can then copy and paste the code into UIflow (but you cant save them there). So if the code works, I copy and paste the code back into Notepad++ and save it as a *.py file.
                2. Using the standard editor programming ESP32 and ESP8266 in microphyton: yPyCraft or Thonny (https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/). The UIFlow Python editor probably is a clone of one of these. With these editors you can even do a simple code/syntax check, then copy and paste back and forth as I described with Notepad++.
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post