Yeah, just like any scripting language:
function Exportmydarnmodels( model_list, destination )
{
var n, nb_models;
nb_models = model_list.length;
for ( n = 0; n < nb_models; n++ ) {
model_name = model_list[n] + "." + n + ".obj";
OBJExport( model_list[n], desitnation, model_name );
}
return(0);
}
The above example is fictitous JScript code, but the real thing would not be too far from it. I don't have XSI in front of me now, otherwise I'd write it up.
Just open the script editor and start typing. By default it's set to use VBscript, but you can also use JScript (JavaScript) if you prefer by adjusting File > User Preferences > Scripting/Logging. Perlscript and Pythonscript can also be used, but you have to install them yourself.