home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / scincprs.sit / References / background_2674.txt < prev    next >
Text File  |  1991-02-03  |  6KB  |  268 lines

  1. -- background: 2674 from stack: in
  2. -- bmap block id: 4187
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on phraseSearch
  8.   Global keep, recordCount, Count, searchString, scanString, holder
  9.   --hide message box
  10.   put 0 into count
  11.   put 0 into recordCount
  12.   put empty into keep
  13.   ask "Search String"
  14.   put the ticks into startTicks
  15.   if it is not "" then
  16.     put it into searchString
  17.     send DoSearch
  18.   end if
  19.   go to card 2 of "Command Stack"
  20.   if keep is empty then put "None found" into keep
  21.   put keep into card field "WhereItIs"
  22.   put recordCount into card field "lastField"
  23.   put holder & ":  " & searchString into card field searchName
  24.   put 0 into intStore
  25.   put scanString into card field scnField
  26.   put the ticks into endTicks
  27.   --put (endTicks - startTicks) into message box
  28. end phraseSearch
  29.  
  30. on scanForward
  31.   global scanString, stringPosition, recordCount
  32.   if stringPosition < recordCount then
  33.     add 1 to stringPosition
  34.     put item stringPosition of scanString into cardNum
  35.     visual scroll down
  36.     go to card cardNum
  37.     set lockScreen to false
  38.   else
  39.     beep
  40.   end if
  41. end scanForward
  42.  
  43. on scanBackward
  44.   global scanString, stringPosition
  45.   if stringPosition > 1 then
  46.     subtract 1 from stringPosition
  47.     put item stringPosition of scanString into cardNum
  48.     visual scroll up
  49.     go to card cardNum
  50.     set lockScreen to false
  51.   else
  52.     beep
  53.   end if
  54. end scanBackward
  55.  
  56. on DoSearch
  57.   global holder, count, recordCount, targetField, searchString, keep, scanString
  58.   set cursor to watch
  59.   put holder into targetField
  60.   put empty into scanString
  61.   put the number of last card into tfield
  62.   go first card
  63.   repeat with count = 1 to the number of cards
  64.     if searchString is in field targetField of card count then
  65.       add 1 to recordCount
  66.       put recordCount & "," && (char 1 to 46 of line 1 of field targetField of card count) & "," & count & numToChar(13) after keep
  67.       put count & "," after scanString
  68.     end if
  69.   end repeat
  70.   put "/" after scanString
  71. end DoSearch
  72.  
  73.  
  74. -- part 1 (button)
  75. -- low flags: 00
  76. -- high flags: 2000
  77. -- rect: left=274 top=298 right=327 bottom=303
  78. -- title width / last selected line: 0
  79. -- icon id / first selected line: 26425 / 26425
  80. -- text alignment: 1
  81. -- font id: 0
  82. -- text size: 12
  83. -- style flags: 0
  84. -- line height: 16
  85. -- part name: Next
  86. ----- HyperTalk script -----
  87. on mouseUp
  88.   visual scroll left
  89.   go next card
  90. end mouseUp
  91.  
  92.  
  93.  
  94. -- part 2 (button)
  95. -- low flags: 00
  96. -- high flags: 0000
  97. -- rect: left=229 top=297 right=327 bottom=260
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 902 / 902
  100. -- text alignment: 1
  101. -- font id: 0
  102. -- text size: 12
  103. -- style flags: 0
  104. -- line height: 16
  105. -- part name: 
  106. ----- HyperTalk script -----
  107. on mouseUp
  108.   visual scroll right
  109.   go previous card
  110. end mouseUp
  111.  
  112.  
  113.  
  114. -- part 3 (field)
  115. -- low flags: 01
  116. -- high flags: 0000
  117. -- rect: left=448 top=309 right=342 bottom=512
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 2
  122. -- text size: 18
  123. -- style flags: 256
  124. -- line height: 24
  125. -- part name: cardNum
  126.  
  127.  
  128. -- part 4 (field)
  129. -- low flags: 00
  130. -- high flags: 0002
  131. -- rect: left=94 top=10 right=28 bottom=490
  132. -- title width / last selected line: 0
  133. -- icon id / first selected line: 0 / 0
  134. -- text alignment: 0
  135. -- font id: 3
  136. -- text size: 12
  137. -- style flags: 0
  138. -- line height: 16
  139. -- part name: Topic
  140.  
  141.  
  142. -- part 6 (field)
  143. -- low flags: 00
  144. -- high flags: 0007
  145. -- rect: left=94 top=32 right=85 bottom=490
  146. -- title width / last selected line: 0
  147. -- icon id / first selected line: 0 / 0
  148. -- text alignment: 0
  149. -- font id: 3
  150. -- text size: 12
  151. -- style flags: 0
  152. -- line height: 16
  153. -- part name: Title
  154.  
  155.  
  156. -- part 7 (field)
  157. -- low flags: 00
  158. -- high flags: 0007
  159. -- rect: left=94 top=90 right=141 bottom=490
  160. -- title width / last selected line: 0
  161. -- icon id / first selected line: 0 / 0
  162. -- text alignment: 0
  163. -- font id: 3
  164. -- text size: 12
  165. -- style flags: 0
  166. -- line height: 16
  167. -- part name: Author
  168.  
  169.  
  170. -- part 8 (field)
  171. -- low flags: 00
  172. -- high flags: 0002
  173. -- rect: left=94 top=145 right=177 bottom=490
  174. -- title width / last selected line: 0
  175. -- icon id / first selected line: 0 / 0
  176. -- text alignment: 0
  177. -- font id: 3
  178. -- text size: 12
  179. -- style flags: 0
  180. -- line height: 16
  181. -- part name: Affil
  182.  
  183.  
  184. -- part 9 (field)
  185. -- low flags: 00
  186. -- high flags: 0002
  187. -- rect: left=94 top=181 right=213 bottom=490
  188. -- title width / last selected line: 0
  189. -- icon id / first selected line: 0 / 0
  190. -- text alignment: 0
  191. -- font id: 3
  192. -- text size: 12
  193. -- style flags: 0
  194. -- line height: 16
  195. -- part name: Ref
  196.  
  197.  
  198. -- part 11 (button)
  199. -- low flags: 00
  200. -- high flags: A003
  201. -- rect: left=151 top=291 right=308 bottom=218
  202. -- title width / last selected line: 0
  203. -- icon id / first selected line: 0 / 0
  204. -- text alignment: 1
  205. -- font id: 0
  206. -- text size: 12
  207. -- style flags: 0
  208. -- line height: 16
  209. -- part name: Next
  210. ----- HyperTalk script -----
  211. on mouseUp
  212.   send scanForward
  213. end mouseUp
  214.  
  215.  
  216.  
  217.  
  218. -- part 13 (button)
  219. -- low flags: 00
  220. -- high flags: A000
  221. -- rect: left=13 top=286 right=334 bottom=91
  222. -- title width / last selected line: 0
  223. -- icon id / first selected line: 1001 / 1001
  224. -- text alignment: 1
  225. -- font id: 0
  226. -- text size: 12
  227. -- style flags: 0
  228. -- line height: 16
  229. -- part name: Command Stack
  230. ----- HyperTalk script -----
  231. on mouseUp
  232.   visual iris close
  233.   go to card 2 of "Command Stack"
  234. end mouseUp
  235.  
  236.  
  237.  
  238. -- part 15 (button)
  239. -- low flags: 00
  240. -- high flags: A003
  241. -- rect: left=150 top=312 right=329 bottom=218
  242. -- title width / last selected line: 0
  243. -- icon id / first selected line: 0 / 0
  244. -- text alignment: 1
  245. -- font id: 0
  246. -- text size: 12
  247. -- style flags: 0
  248. -- line height: 16
  249. -- part name: Previous
  250. ----- HyperTalk script -----
  251. on mouseUp
  252.   send scanBackward
  253. end mouseUp
  254.  
  255.  
  256. -- part 17 (field)
  257. -- low flags: 00
  258. -- high flags: 0007
  259. -- rect: left=94 top=218 right=282 bottom=490
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 0 / 0
  262. -- text alignment: 0
  263. -- font id: 3
  264. -- text size: 12
  265. -- style flags: 0
  266. -- line height: 16
  267. -- part name: Notes
  268.