You could make a “for loop” and then loop each apps function if they are being run. Also, anything that requires visual stuff (like UI or effects) shouldn't run if the app isn't what the user selected.