I am trying to run some Python from Intuiface and run into a few problems:
I want to run the Python script when intuiface starts running, so I made an trigger on the first Scene being entered and use *launch application* to run the script. Problem is that when I move to an other scene and go back to the startscene, another instance of the Python script is being runned. I now solved it with a splashscreen, but is there a trigger on application load possible?
Is it possible to send variables (from a text input for example) to a Python script ?
When the Python script runs it opens a command line window over intuiface. Can you force intuiface to be on top or run the application minimized?
I want to run the Python script when intuiface starts running, so I made an trigger on the first Scene being entered and use launch application to run the script. Problem is that when I move to an other scene and go back to the startscene, another instance of the Python script is being runned. I now solved it with a splashscreen, but is there a trigger on application load possible? - You need to create a trigger on the scene itself, What you would need to do for this is click on your scene in the Scene Structure the add a trigger such as timer has elapsed 0.1 seconds then it will run it automatically when you open the XP again.
Is it possible to send variables (from a text input for example) to a Python script ? - Not sure this can be done check with support staff.
When the Python script runs it opens a command line window over intuiface. Can you force intuiface to be on top or run the application minimized?- There is a program you would need to get its called “always on top” and press Ctrl+Space then that issue is resolved. or use Autohotkey and make the script run at startup to force the program to stay on top.
I want to use two instances of Python script on same scene. How do we make without interfering with another window. I am making four browsers in same scene and want to launch application using Python script 2-3 times.
You might want to contact our support team in a private ticket so you can share a bit more information with us.
Your question probably relies a lot on what your Python script is doing, but if it’s related to some OS-level event injection (mouse / keyboard), you’ll probably want to add delays between your scripts to make sure they don’t interfere with each other.
You can add below commands to your script, it will hide the command prompt.
hide = win32gui.GetForegroundWindow()
win32gui.ShowWindow(hide, win32con.SW_HIDE)
You should also add import win32gui (library to code)