set outfile to "0:/parts.txt". log "======== New run ========" to outfile. for i in range(0,ship:parts:length) { log "___Modules for ship:parts[" + i + "]____" to outfile. log ship:parts[i]:allmodules to outfile. }