;; a sequence of useful commands ;; provides a GUI for cd pro guicd cd, DIALOG_PICKFILE(/directory) end ;;simple directory aliases' pro mlib cd, '~/idl' end pro home cd, '~/' end pro mr cd, '/Volumes/BigusDiskus/SandModel' end pro taw cd, '/Volumes/BigusDiskus/TAwork' end pro cdcd cd, '/Volumes/' i=file_search('CSES*') if n_elements(i) eq 1 and i(0) ne '' then begin cd, i(0) endif else begin i=file_search('*') print, 'Unsuccesful, Available Volume name(s)=', i filename = '' read, 'enter one of the above : ', filename if file_test(filename, /directory) then begin print, 'Changeing directory' cd, filename endif endelse end pro pwd cd, current=current print, current end ;; executes equivilant to unix ls command pro ls, pat if n_elements(pat) eq 0 then pat='' cd, current=current print, current print, '---------------------------' spawn, 'ls '+pat end pro ll, pat if n_elements(pat) eq 0 then pat='' else pat=' '+pat cd, current=current print, current print, '---------------------------' spawn, 'ls -l'+pat end pro la, pat if n_elements(pat) eq 0 then pat='' else pat=' '+pat cd, current=current print, current print, '---------------------------' spawn, 'ls -a'+pat end ;;change directoried to key* where key is a prefix to a directory pro mcd, key if n_elements(key) eq 0 then key='' if file_test(key, /directory) then begin cd, key endif else begin key=key+'*' i=findfile(key) if n_elements(i) eq 1 then begin j=strlen(i(0)) if strmid(i(0), j-1, j) ne ':' then print, i(0), ' is not a directory' $ else cd, strmid(i(0), 0, j-1) endif else print, i endelse end ;;spawn but search the bin directory pro bs, app if n_elements(app) eq 0 then return app = '/Applications/*'+app+'*.app' name=file_search(app) if n_elements(name) eq 1 then begin ;and name(0) ne -1 then begin spawn, 'open '+name(0) endif else print, name end pro clearidl widget_control,/reset & close,/all & heap_gc & retall end pro up cd, '../' end pro dispbsq, fname, ns, nl, nb, type=type openr, un, /get, fname img = make_array(ns, nl, type=type) for i=0, nb-1 do begin ; window, i+1 ; wset, i+1 if ns lt 400 and nl lt 300 then begin for i=i, (800/ns + 600/nl)