I am new to praat, so maybe this is an easy question. I try to create a script in praat that will go through some objects in my object list with a for loop and will remove silent intervals. I have created this script that I will put in a for loop.
selectObject: i
inten=To Intensity... 100 0 "no"
txt=To TextGrid (silences)... -35 0.1 0.05 'silent' 'sounding'
selectObject: i
plusObject: txt
Extract intervals where: 1, "no", "contains", "sounding"
myobj=Concatenate
Copy: string$(i)
selectObject: inten
plusObject: txt
plusObject: myobj
Remove
Although I get what I want my problem is in the line
Extract intervals where: 1, "no", "contains", "sounding"
In this line the parts that contain sound are extracted and selected. Then I use concatenate immediately to create the desired file and select it. However because this line produces more that one variable I cannot save it. Therefore later on I do not have a reference to remove it from my object directory. Although I could still run it like that my directory would be flooded and I do not think this is elegant. Any suggestions?