Jump to content


Lua script runs once and quits


  • Please log in to reply
3 replies to this topic

#1 M_1


    New Member

  • Normal Members
  • Pip
  • 4 posts

Posted 14 April 2018 - 19:50



Silly question, but how do I run a Lua script continuously? 

I'm sending OSC messages into TouchDesigner, and I need the info constantly updating. Within the built-in 'Editor & Terminal' I can execute the script but it runs once quits. 


I've tried launching the script from my actual terminal but I get "permission denied"


The script is located inside the 'User Scripts' folder 


Any tips will be appreciated:) 

#2 encryptedmind


    Big GrandDaddy Member

  • Normal Members
  • PipPipPipPipPipPipPipPip
  • 493 posts
  • Gender:Male
  • Location:India
  • Interests:Jazz, malware, world travel, women

Posted 14 April 2018 - 20:00

...maybe just use a while(true) loop...works great for games and stuff..
Victor Marak



#3 danoise


    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7009 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 14 April 2018 - 20:08

Your script indeed will run once and quit. Then, the Lua garbage collector will pick it up, and **poof**


So, once you go a little beyond simple fire-and-forget type scripts, I would suggest that you create a tool.

It's a small step - create a folder containing a manifest.xml + main.lua and you're good to go. 


The tool lets you define variables that stick around, attach listeners and many other things. 

Tracking with Stuff. API wishlist | Soundcloud

#4 Neurogami


    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 778 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 15 April 2018 - 02:04

Also look into renoise.tool():add_timer

Also tagged with one or more of these keywords: OSC