... and here is a starter example:
#!/bin/tcsh
# make a list of dsets you want to view; here, they are in a single directory
set all_dsets = ( DSET1 DSET2 DSET3 ... )
set Ndset = ${#all_dsets}
# have at least as many letters as $all_dsets
set all_letts = ( A B C D E F G H )
set Nlett = ${#all_letts}
if ( ${Nlett} < ${Ndset} ) then
echo "** Hey, going to need more than ${Nlett} for these ${Ndset} dsets!"
exit 1
endif
# -----------------------------------------------------
set NPB = `afni -available_npb_quiet`
set x0 = 200
# open up the GUI
afni -npb ${NPB} -niml -yesplugouts -echo_edu
# loop over datasets, move windows with each new dset opened
foreach ii ( `seq 1 1 ${Ndset}` )
# pick out each dset, and a letter designation for the controller
set dset = ${all_dsets[$ii]}
set ll = ${all_letts[$ii]}
# open up each, moving a bit to the right with each new set
plugout_drive -npb ${NPB} -echo_edu \
-com "OPEN_WINDOW ${ll} geom=500x500+${x0}+5" \
-com "OPEN_WINDOW ${ll}.axialimage geom=500x500+${x0}+200 \
ifrac=0.8 opacity=9" \
-com "OPEN_WINDOW ${ll}.sagittalimage geom=500x500+${x0}+725 \
ifrac=0.8 opacity=9" \
-com "SWITCH_UNDERLAY ${ll}.${dset}" \
-quit
@ x0 = $x0 + 510
end