home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 19 / AACD19.BIN / AACD / Programming / AWNP / AWNP-Docs / Demos / GUIList < prev    next >
Encoding:
AmigaDOS Script File  |  2000-06-01  |  1.2 KB  |  47 lines

  1. .key dest,all/s,dirs/s,files/s,wide/k,high/k,pat/k
  2. .bra {
  3. .ket }
  4.  
  5.  
  6. ; set text for pattern match in list command
  7. set pat ""
  8. if not {pat$1} eq 1
  9. set pat pat={pat}
  10. endif
  11.  
  12. ; build a temp file defining the gui
  13.  
  14. ; define the window (delay the window open) and a list browser in it
  15. echo >t:thelist.gui  "*"GUIList  {dest$Current Dir} *" m nowindow defg q a cs*nlistbrowser ro lbl *"Name|Size|Date|Time|Protection|Key|Path*" arrows minw {wide$600} minh {high$200} st"
  16.  
  17. ; the lformat creates a list brwser node for each file.
  18. list >>t:thelist.gui {dest} {all} {dirs} {files} $pat lformat "browsernode gt *"%n|%l|%d|%t|%a|%k|%s%s*""
  19.  
  20. ; some disabled menus to display a little info
  21. echo >>t:thelist.gui "menu gt *"Project  |About|$!List wrapper with|$!  GUI by AWNPipe:" noline
  22. echo >>t:thelist.gui "|Author  |$!William H.M. Parker|$! <bill@amitrix.com>*""
  23.  
  24. ; end the gui definition
  25. echo >>t:thelist.gui "open"
  26.  
  27. ;sort list by column 6 (path)
  28. echo >>t:thelist.gui "id 1 sort 6"
  29.  
  30. ;open the window
  31. echo >>t:thelist.gui "id 0 s 64"
  32.  
  33. ;turn off modify
  34. echo >>t:thelist.gui "m"
  35.  
  36.  
  37. ; send the file to the pipe
  38. copy t:thelist.gui awnpipe:/xc
  39.  
  40. ; cleanup
  41. delete t:thelist.gui >nil:
  42. unset pat
  43.  
  44. ;The gui only displays information all gadgets are read only. It goes away
  45. ;when the user closes its window
  46.  
  47.