Controlling other programs is called process control.
But controlling other processes is very broad.
For example, based on Windows, processes are allocated per-process memory space and are not allowed to interfere with each other.
There can be many ways to control other processes, such as simply hooking the message, dll injection, and also hooking the api to control it.
In short, it requires a lot of learning, such as operating system, API of target operating system, and system programming.
If you want to change the default output device for Windows, of course, you have to take a good look at the features that Windows provides. Please refer to the link below (it is provided as COM, so you must also have COM knowledge).)
https://msdn.microsoft.com/en-us/library/windows/desktop/dd370805(v=vs.85).aspx
Finally, to use COM on Python, there are also ctypes, but many pywin32 modules are used.
https://sourceforge.net/projects/pywin32/
© 2024 OneMinuteCode. All rights reserved.