GUI creation with AI

Hey, I just wanted to share some experiments I did after reading this post Create Windows Vision from a script - Ignition - Inductive Automation Forum .
Based on that idea I tried feeding the xml code of a few example windows into different chatbots and prompting them to create new windows based on that.
While it did work better than expected with GPT4 and not only made a correct layout it even was able to assign small scripts to components. I still don't think that it is viable since the xml files tend to get rather big quickly and even with this small window I almost hit the token limit of 4000. One could probably do further testing if one has access to a model with bigger input.
Just wanted to share maybe someone has ideas how to improve this or maybe with better models this becomes viable.

Prompt:
based on these examples create an xml file for a window with the size 500x500 that has two labels on the left side below each other with a spacing of 5 between them. On the right there should be a button that sets the text of both labels to a random number. make all components the size 20x50. Dont comment your code.
(I resized the components since 20x50 is not a good size but it was correct)


After clicking:

2 Likes