home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / editors / hypsh40b.arj / HYPDEVEL.LZH / GADGETS.HYP < prev    next >
Text File  |  1991-04-24  |  5KB  |  249 lines

  1. .REMARK
  2. Demo frameset - browser
  3. Copyright (c) 1989 N.G.Taylor
  4. .CHECK +fa
  5. Check both menu types
  6.  
  7. .HEADER
  8.  ~M~TwF~TKile~Kf~E│~M~TwO~TKptions~Ko~E│~M~TwH~TKelp~Kh~E│~AHISTORY $6~C33~Pb@B~E│ $1 - $2
  9. ═════╧═══════╧════╧═════════════╧════════════════════════════════════════
  10. .
  11. .FOOTER
  12. ~L22
  13. ═══════════════════════════════════════════════════════════════════════════════
  14.  F1 ~AHELP~PMHelp~E F2 ~ACONTENTS~PA@C~E F3/4 ~ABACKTRACK~PB~E F5 ~ANOTEPAD~PA@R~E F6 ~ASEARCH~PA@X?Search string~E F7 ~ATYPE FILE~PT$_~E F10 ~AQUIT~PQ~E
  15. .
  16.  
  17. .MENU File
  18. Directory   |Y@d*.*
  19. Change dir. |C@L*.
  20. Browse dir. |SBrowse
  21. Quit        |Q
  22. .
  23.  
  24. .MENU Options
  25. Create notepad   |O01;pO.K.
  26. No backtrack     |O20
  27. Backtrack on     |O21
  28. Disable warnings |O80
  29. Warnings on      |O81
  30. .
  31.  
  32. .MENU Help
  33. Information |NInfo
  34. Selecting   |NSelecting
  35. Funct. keys |NFkeys
  36. .
  37. .SCRIPT MENBAR
  38. ZX2;ZY1
  39. .
  40. .REMARK
  41. Add extension of file, followed by action to perform for that file.
  42. The variable $< contains the full file name
  43. The actions 'L' below are dummy actions for extensions for which
  44. no action is required. Default action is to display the file as text.
  45. Directories, .TXT and .BAT files are handled in the BROWSE script below.
  46. Additional special cases can be added there as required.
  47. .MENU extns
  48. OBJ|L
  49. LIB|L
  50. DBF|L
  51. SYS|L
  52. EXE|Nexec
  53. COM|Nexec
  54. PIC|G$<
  55. PCX|G$<
  56. HYP|dHS $<
  57. NTE|t$<
  58. HSF|c$<
  59. MNU|A@F$<
  60. *|T$<
  61. .
  62. .REMARK
  63. This is a menu of things which can be done to directories.
  64. .MENU Directory
  65. Change to|C$<
  66. Show     |DDIR/W $<
  67. .
  68. .REMARK
  69. This is a menu for options on files with extension .TXT or .BAT
  70. .MENU Text File
  71. Type     |T$<
  72. Edit     |dHN $<
  73. .
  74.  
  75. .NOTE Confirm
  76.      $\
  77.  ┌──────────┐  ┌──────────┐
  78.  │ ~A   OK   ~PO*C1~Ko~E │  │ ~A CANCEL ~PO*C~Kc~E │
  79.  └──────────┘  └──────────┘
  80. .
  81. .NOTE Info
  82.    - $9 -
  83.  Frame: $1
  84.  Title: $2
  85.  File : $3
  86.  Date : $4
  87.  Time : $5
  88.  ~ABacktrack ~O2 ~PO2A;NInfo~E with $6 entries
  89.  ~AAutoref ~O4 ~PO4A;NInfo~E
  90.  Error status $? ~C32~AClear~PYah;NInfo~E
  91. .
  92.  
  93. .NOTE Selecting
  94. Press LEFT button to select item
  95. Press RIGHT mousebutton to select
  96. menu bar. Use TAB to move to next
  97. reference, Shift TAB for previous
  98. .
  99. .NOTE Browser
  100. This is a sample directory browser
  101.  
  102. Select directories to move around.
  103.  
  104. Select text files to type them.
  105. .
  106. .NOTE exec
  107. An action could be
  108. added to execute the
  109. selected program.
  110. .
  111.  
  112. .NOTE Fkeys
  113. F1 Help            F2  Browse
  114. F3 Backtrack       F4  Select back
  115. F5 Notepad actions F6  Search text
  116. F7 Type file       F8  Do action    
  117. F9 DOS Shell       F10 Quit
  118. .
  119. .REMARK
  120. Directory browser with actions depending on file type.
  121. See also MENU 'extns' above.
  122. .SCRIPT Browse
  123. NBrowser
  124. Lpd;Y@L*.*
  125. jspd
  126. J$>
  127. A@Mextns[$>];Jpd
  128. L
  129. L.
  130. A@Mdirectory;Jpd
  131. LTXT
  132. LBAT
  133. LC
  134. A@MText File;Jpd
  135. .
  136.  
  137. .SCRIPT SETUP
  138. O#
  139. O17
  140. O*41
  141. OTWB
  142. KF1MHelp
  143. KM1HELP
  144. KH4SMENBAR
  145. Vt°
  146. Vd$
  147. Vsfirst
  148. VxDog
  149. VnFrodo
  150. VZ$d?
  151. .
  152.  
  153. .FRAME Browser
  154. .TITLE DOS directory structure browser
  155.  
  156.     This option provides a simple MSDOS directory structure browser.
  157.  
  158. [1]    Press This to browse -> ~SBrowse~K1~E
  159.  
  160. [2]    This hyperfile contains a number of ~Fuseful items~K2~E for
  161.     authors to include in their own hyperfiles
  162.  
  163. [3]    Also some handy ~FGadgets~K3~E are provided for authors
  164. .
  165. .FRAME useful items
  166. .TITLE items for authors to use
  167.     A number of useful items are provided in this hyperfile.
  168.  
  169.     An error number menu provides a useful means of getting the
  170.     text associated with an error status. The action
  171.  
  172.         p@MError text($$?)
  173.  
  174.     Will display the error text associated with the last error.
  175.  
  176.         The .HEADER demonstrates how a simple menu bar can be set up.
  177.  
  178.         The Info note shows how options can be toggled
  179. .
  180. .FRAME Gadgets
  181. .TITLE Useful accessories for hyperfiles
  182.  
  183. [1]    ~nThe confirm box~Psconf(feed $x)~K1~E
  184.  
  185. [2]    The selector - ~n$x~PVx@mselector;y~K2~E
  186.  
  187. [3]    The stepper - ~n$s~PVs@mstepper[$s];y~K3~E
  188.  
  189. [4]    The dialogue box - ~nName input~Pndialogue;y~K4~E  {$n}
  190.  
  191. [5]    ~FDescription~K5~E - Details about gadgets
  192. .
  193. .MENU selector
  194. Dog
  195. Cat
  196. Hamster
  197. Goldfish
  198. Rabbit
  199. Mouse
  200. Elephant
  201. .
  202. .SCRIPT conf
  203. A@NConfirm
  204. zCp$n the $x growls menacingly
  205. aCp$n the $x purrs gratefully
  206. .
  207. .REMARK
  208. Above is example of conditional actions
  209. .
  210. .MENU stepper
  211. first|second
  212. second|third
  213. third|fourth
  214. fourth|fifth
  215. fifth|sixth
  216. sixth|seventh
  217. seventh|eighth
  218. eighth|ninth
  219. ninth|first
  220. .
  221. .NOTE dialogue
  222.  
  223.  Enter the name of your $x here
  224.  
  225.    Name: ~I$n~W20~PVn%s;y~E~Q
  226.  
  227. .
  228. .FRAME description
  229. .TITLE details about gadgets
  230. ~A~PP;B~E~Q ~HThis is used for immediate return after confirmation
  231.     The confirm box is useful for confirming an action before it
  232.     is executed, in cases where some irreversible action is to
  233.     take place. e.g. a file is to be deleted. The confirm box can
  234.     be extended to any number of options.
  235.  
  236.     The selector presents a menu from which a new value for a
  237.     variable can be chosen. The variable can be used as the
  238.     reference text to show the current value.
  239.  
  240.     The stepper is similar to the selector, only allows the set
  241.     of values to be stepped through one at a time.
  242.  
  243.     The dialogue box is used to input a string from the user. It
  244.     is similar to the prompted input action, but it permits extra
  245.     information to be displayed around the input field, such as
  246.     the values of other variables
  247. .
  248.  
  249.