refresh Python script auto

Hi

I’m new to TD and I’d like to know how do you have a automatic script refresh?
without rightClick > RunScript
With node or directly in my script?

stupid example :

[code]
import time

while 1:
refresh(‘myScript’)
time.sleep(1)[/code]

Use an Execute DAT with either Frame Start or Frame End, then put your python code in the correct callback. Also recommend not using sleep since TouchDesigner is single threaded, so that will hold the whole process.

Also check out the run method delay options for executing a script after a set amount of time:

derivative.ca/wiki088/index. … ss#Methods

couldn’t you also use a script CHOP an plug some input into it, which will run the corresponding callback script each time the CHOP gets cooked?

[url]http://www.derivative.ca/wiki088/index.php?title=Script_CHOP[/url]