After launching, use observe to find targets and
input to act:
gw.launch_app(sid, path=r"C:\Windows\System32\notepad.exe")obs = gw.observe(sid, mark=True)edit = next((t for t in obs.targets if t.role == "edit"), None)if edit: gw.click_target(sid, edit.id, targets=obs.targets)gw.type_text(sid, "Driven through the Glasswarp API")
Clean up launched apps
gw.kill_app(sid, pid=result["pid"]) # or kill all session-launched apps
Session-launched apps are cleaned up by safety_restore on session end, but
kill long-running apps explicitly when your task is done.