dclaar last edited by
I would like to combine 2 m5f files, but I can't seem to find a way. Is this supported?
liemph 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:
- Assume your m5f files are A.m5f and B.m5f.
- Open A.mf5 with UiFlow and go the python tab and copy your python code and save it to A.py.
- Do the same for B.mf5, save to B.py.
- 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.
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.
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.
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.
crami25 last edited by
I'm using 2 techniques:
- 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.
- 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++.