Event to host System Calls when targeting PC Simulator

What do you want to achieve?

When targeting the PC simulator it would be great to allow system calls as events so that, for example, batch files could be run.

Do you see alternative options and workaround to achieve it?

LVGL port for Windows

Mention some use cases

This could be a nice way to test some business logic or demonstrate a proof of concept for the GUI. It also means that the compiled sim could - in it’s own right - be a great front end for command line applications and interactive scripts. At present I’ve been doing this with the windows lvgl port but it would be nice to have some ‘outside world’ interop built into SLS.

Interesting idea but it makes sense!

So the suggestion is to have an event action like “Run script” (or “Run shell script”?) where you can enter a text (e.g. “cd some/dir; python3 a.py”) and the SLS will run the text in a terminal. Is it correct?

Yes, or just keep it as loose as possible so something like:
Event (on clicked) = shell command send.
Send String = system(start C:/temp/helloworld.bat).

1 Like

Sounds good, we will add it!