I’m currently running a pyautogui script on 5 virtual machines (vmware). Now I want to top that up. I want to run ±15 scripts on just one computer. I don’t think it’s very healthy for my computer to run that many virtual machines. So I’m looking for an alternative of a virtual machine. Something like a window that you can open, run the script in it, minimize the window and let it run in the background.
I’ve already found a program called “DexPot” which is a virtual desktop program but unfortunately every window/desktop uses the same mouse. So when I have one desktop open and minimize it, the script will run on the next desktop.
Help much appreciated, been looking for so long now !
Microsoft has a solution for this. It is called Windows Sandbox. The sandbox instances do not need as much memory as VMWare instances because they share parts of windows which are common to all instances.
At the same time, desktops, keyboard, and mouse are completely isolated, so they do not interfere with each other.
I found an article with instructions to set it up at https://techcommunity.microsoft.com/t5/Windows-Kernel-Internals/Windows-Sandbox/ba-p/301849
Let me know if you are seeing issues with this approach.
Another option would be to use multiple RDP sessions with a single windows instance. Each RDP session gives you a separate desktop with its own mouse and keyboard. But this approach is likely more complicated than Windows Sandbox because it is not as well supported by microsoft. If you want to try this, have a look at Multi instances Support
There is another way to run many bots on the same (virtual) machine. Using input focus scheduling, you can avoid the bots interfering with each other’s inputs while running in parallel. How many you can run in parallel this way depends on the saturation per bot, meaning how many percent of the time it needs to send input. (You can check this for any of your app sessions in devtools)
Sorry I’m new to this. But I’ve actually not been able to get pyautogui to work in VM ware. How did you do this?
I also heard that it was possible to send commands directly to certain windows like bluestacks and interface while it’s running in background. Have you heard of this?
There is a new release of the BotLab client to improve support for running multiple bots on the same (virtual) machine. The play session configuration now offers to turn off the input focus scheduling feature:
When you use separate RDP sessions to isolate bot instances from each other, input focus scheduling is not necessary for these sessions. Therefore, turning it off in these cases is better to avoid unnecessary delays of your bot’s actions in the game clients.