Skip to content

Instantly share code, notes, and snippets.

@zombience
Last active August 10, 2018 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zombience/f7dd8a2539e2dfd01b8411b4390783d7 to your computer and use it in GitHub Desktop.
Save zombience/f7dd8a2539e2dfd01b8411b4390783d7 to your computer and use it in GitHub Desktop.
snippet used to spawn touch designer minimized - for use from WITHIN touchdesigner to launch a separate instance
import os
import psutil
import subprocess
touch = "{}/TouchDesigner099.exe".format(app.binFolder)
inst = "{}/example_file.toe".format(project.folder)
SW_MINIMIZE = 6
info = subprocess.STARTUPINFO()
info.dwFlags = subprocess.STARTF_USESHOWWINDOW
info.wShowWindow = SW_MINIMIZE
process = subprocess.Popen([touch, inst], startupinfo=info)
pid = process.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment