pro window_select,title = title,xs = xs,ys = ys if ( n_elements( title ) eq 0 ) then title1 = '' else title1 = ' - ' + title if ( n_elements( xs ) eq 0 ) then xs = 640 if ( n_elements( ys ) eq 0 ) then ys = 512 menuarr = [ ' window NO.0 ',' window NO.1 ',$ ' window NO.2 ',' window NO.3 ',$ ' window NO.4 ',' window NO.5 ',$ ' window NO.6 ',' window NO.7 ',$ ' window NO.8 ',' window NO.9 ' ] sel = wmenu_sel( menuarr,/one ) case 1 of ( sel( 0 ) eq 0 ):window,0,xs = xs,ys = ys,title = 'IDL 0' + title1 ( sel( 0 ) eq 1 ):window,1,xs = xs,ys = ys,title = 'IDL 1' + title1 ( sel( 0 ) eq 2 ):window,2,xs = xs,ys = ys,title = 'IDL 2' + title1 ( sel( 0 ) eq 3 ):window,3,xs = xs,ys = ys,title = 'IDL 3' + title1 ( sel( 0 ) eq 4 ):window,4,xs = xs,ys = ys,title = 'IDL 4' + title1 ( sel( 0 ) eq 5 ):window,5,xs = xs,ys = ys,title = 'IDL 5' + title1 ( sel( 0 ) eq 6 ):window,6,xs = xs,ys = ys,title = 'IDL 6' + title1 ( sel( 0 ) eq 7 ):window,7,xs = xs,ys = ys,title = 'IDL 7' + title1 ( sel( 0 ) eq 8 ):window,8,xs = xs,ys = ys,title = 'IDL 8' + title1 ( sel( 0 ) eq 9 ):window,9,xs = xs,ys = ys,title = 'IDL 9' + title1 endcase return end