I need to run a script that will give me a list of components in the current network level and feed them to a foreach in order to do use opparm on each one.
I thought lc might be the one but it throws up an error and stops there. It would be nice if it could just ignore operators for whom the parameter is irrelevant.
more specifically, I want to enable or disable many panels at once as well as toggle their visibility.
I’m also trying to go through a project and lock each moviein TOP and set its file parameter to “”
(to send an example file for a bug report
I got the syntax wrong but can’t think how to fix it (tired with deadline looming as usual)
" /project1/text1 (line 2 - if (strcmp(optype("$i"),"moviein")==0)): Expression error: Bad path argument"
[code]foreach i ( execute("lc -R") )
if (strcmp(optype("$i"),"TOP:moviein")==0)
unfortunately, lc doesn’t list full paths, and you are also running into problems with empty strings in the foreach. below is a working example. note that the script should be excecuted in the component you want to recurse through, and the script is called recursively to execute in the current path. hope this helps.
[code]foreach i ( execute("lc") )
if (strcmp("$i","")==0)
break;
endif
set net = `opfullpath(".")`
if (`strcmp(optype("$i"),"TOP:moviein")==0`)
echo " do stuff to " $net/$i
else if (`strmatch("COMP:*",optype("$i"))`)
echo " go in network " $net/$i
cc $i
run -c $arg0
cc ..
endif