home *** CD-ROM | disk | FTP | other *** search
/ Carousel / CAROUSEL.cdr / mactosh / hc / memonote.sit / MemoNoteStack / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1988-01-24  |  8.0 KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>2885</cardID>
  8.     <listID>4020</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>***********************
  17. on mousedown -- 6 Jan 88 - ToggleFieldStyle by Peter Fraterdeus
  18. --ΓÇóPlease Include these comments if you use my NotePads!
  19. -- This Script was written by Peter Fraterdeus of Alphabets, Inc.
  20. -- CompuServe 73306,2703. In the interest of keeping StackWare healthy┬¼
  21. -- you could send comments to 804 Dempster St., Evanston, IL. 60202 !
  22. -- Thanks!
  23. --ΓÇóThis works well with the MemoNotes below, since they're card fields
  24. -- Place in Home stack for global relevanceΓǪ
  25. set lockScreen to true
  26. magicCopy
  27.  
  28. get the name of the target
  29. if it contains "Field"  then
  30. if the shiftKey is down and the commandKey is down then
  31. get style of the target
  32. if it <>"Scrolling" then
  33. set style of the target to scrolling
  34. else
  35. set style of the target to rectangle -- change for a different
  36. end if                                 -- default rect.
  37. end if
  38. else
  39. if it contains "button" and it contains "Note" then
  40. set lockScreen to false
  41. MoveNote
  42. exit to hypercard
  43. end if
  44. end if
  45. end mousedown
  46. **********************
  47. on MoveNote
  48. global gMoveNote
  49. put the mouseLoc into temp
  50. wait 10 -- if the mouse doesn't move within 10 clicks then forget it
  51. get the mouseLoc
  52. if temp<>it  then
  53. repeat until the mouse is up -- doDragButton
  54. set the loc of target to the mouseLoc -- a neat trick,
  55. end repeat
  56. put true into gMoveNote        -- one of the great qualities of
  57. else
  58. put false into gMoveNote       -- object based environments....
  59. end if
  60. send mouseup to target       -- I borrowed the concept, but the
  61. choose browse tool       -- execution is completely my design...
  62. end moveNote
  63.  
  64.  
  65. **********************
  66. on memoNote -- 6 Jan 88 ΓÇö MemoNotesΓäó by Peter Fraterdeus
  67. -- Creates Note button and field on current card.
  68. --ΓÇóShift-OptionΓÇöClick on the MemoNote Button to Copy the button, then
  69. -- go to your Stack and paste it into the Background.
  70. --
  71. --ΓÇóCut this "on memoNote" Script and paste it into the Background,
  72. -- Stack, or Home script. (In Home it will be global for all stacks!)
  73. -- The only script needed in the MemoNoteButton isΓǪ
  74. -- "send copyNote" (and "on mouseupΓǪend mouseup", of course!)
  75. --
  76. --ΓÇóThe Scrolling Note area toggles on and off when the Note Button
  77. -- is clicked. Note that you can set the size of the default field
  78. -- by changing fieldWidth and fieldHeight.
  79. --
  80. --ΓÇóPlease Include these comments if you use my NotePads!
  81. -- This Script was written by Peter Fraterdeus of Alphabets, Inc.
  82. -- CompuServe 73306,2703. In the interest of keeping ShareWare healthy┬¼
  83. -- you could send $15 to 804 Dempster St., Evanston, IL. 60202 !
  84. -- Thanks!
  85. --ΓÇóUpdated 23Jan88 to move notes on click&drag
  86. -- as well as some other polishing of the code
  87. set lockscreen to true
  88. MagicCopy
  89.  
  90. if the shiftKey is down then -- Shift-Click to edit script*
  91. edit script of me
  92. exit memonote          -- * these will work with any button
  93. else
  94. Show msg
  95. put "Click where you want the new Note... (or command-. to cancel)"
  96. beep
  97. set cursor to 2
  98. set lockscreen to true
  99. wait until the mouse is down
  100. put the MouseH into HMouse -- "the clickloc" didn't work here!
  101. put the MouseV into VMouse -- it saved the loc of the MemoNote Bttn.
  102. set cursor to 4
  103. put the number of buttons into ButtonNum
  104. put the number of card fields into FieldNum
  105. put 200 into fieldWidth  -- change these for different note size.
  106. put 100 into fieldHeight --
  107. choose button tool
  108. drag from HMouse,VMouse to┬¼
  109. HMouse+70,VMouse+17 with commandKey -- Draw the new Button
  110.  
  111. choose field tool -- this actually enables the new button so that
  112. -- its properties may be set...
  113. put "card button (ButtonNum +1)" into it
  114. set name of it to "Note" -- don't change this!
  115. show it
  116. set style of it to Rectangle
  117. set autohilite of it to false
  118. set hilite of it to true
  119. set showname of it to true
  120.  
  121.  
  122. drag from HMouse,VMouse+16 to HMouse+fieldWidth,┬¼
  123. VMouse+fieldHeight with commandKey -- Draw the new Field
  124.  
  125. choose browse tool -- this actually enables the new field
  126. get the id of card field (FieldNum +1)
  127. set name of card field id it to "Note"&&it
  128. put "card field id " before it
  129. show it
  130. set style of it to Scrolling
  131. set locktext of it to false
  132. set showlines of it to true
  133. set textFont of it to Geneva
  134. set textSize of it to 9
  135. put it into fieldID
  136.  
  137. -- *** Building the ButtonScript ***
  138. put"*NoteButtonScript*"&return after NoteButtonScript
  139. put"on mouseup"&return after NoteButtonScript
  140. put"  global gMoveNote"&return after NoteButtonScript
  141. put"  put the visible of"&&Fieldid&&" into showing"&return after NoteButtonScript
  142. put"  showfield showing"&return after NoteButtonScript
  143. put"end mouseUp"&return after NoteButtonScript
  144. put"**"&return after NoteButtonScript
  145. put"on killField"&return after NoteButtonScript
  146. put"  set the visible of"&&Fieldid&&" to true"&return after NoteButtonScript
  147. put"  choose field Tool"&return after NoteButtonScript
  148. put"  click at the loc of"&&Fieldid&&""&return after NoteButtonScript
  149. put"  domenu clear field"&return after NoteButtonScript
  150. put"end killField"&return after NoteButtonScript
  151. put"***"&return after NoteButtonScript
  152. put"on showField showing"&return after NoteButtonScript
  153. put"  global gMoveNote"&return after NoteButtonScript
  154. put"  if the paramcount=0 then put false into showing"&return after NoteButtonScript
  155. put"  if (showing=false and gMoveNote = false)┬¼"&return after NoteButtonScript
  156. put"  or (showing=true and gMoveNote = true) then"&return after NoteButtonScript
  157. put"    -- if the field isn't showing and the button hasn't been moved"&return after NoteButtonScript
  158. put"    -- then show the field in its present location"&return after NoteButtonScript
  159. put"    -- or if the field is showing but the button has been moved"&return after NoteButtonScript
  160. put"    -- then reshow the field in its new location"&return after NoteButtonScript
  161. put"    doHilite true"&return after NoteButtonScript
  162. put"    get the rect of me"&return after NoteButtonScript
  163. put"    put it into bRect"&return after NoteButtonScript
  164. put"    get the rect of "&&Fieldid&&""&return after NoteButtonScript
  165. put"    put (item 3 of it - item 1 of it) /2 into fH"&return after NoteButtonScript
  166. put"    put (item 4 of it - item 2 of it) /2 into fV"&return after NoteButtonScript
  167. put"    show"&&Fieldid&&" at trunc(fH)+item 1 of bRect, ┬¼"&return after NoteButtonScript
  168. put"    trunc(fV)+item 4 of bRect-1"&return after NoteButtonScript
  169. put"  else"&return after NoteButtonScript
  170. put"    doHilite false"&return after NoteButtonScript
  171. put"    hide"&&Fieldid&&""&return after NoteButtonScript
  172. put"  end if"&return after NoteButtonScript
  173. put"end showField"&return after NoteButtonScript
  174. put"****"&return after NoteButtonScript
  175. put"MemoNotesΓäó Hypernote system"&return after NoteButtonScript
  176. put"┬⌐1988 PeterFraterdeus"&return after NoteButtonScript
  177. put"CIS 73306,2703"&return after NoteButtonScript
  178. put"ShareWare-$15. to: Alphabets, Inc."&return after NoteButtonScript
  179. put"804 Dempster St./ Evanston, IL. 60202"&return after NoteButtonScript
  180.  
  181. choose button tool
  182. set script of card button (buttonNum +1) to NoteButtonScript
  183. choose browse tool
  184. set cursor to 1
  185. send tabKey to fieldID
  186. put " " into msg
  187. end if
  188.  
  189. end memoNote
  190. ***********************
  191.  
  192. ***********************
  193.  
  194.  
  195. on ShowNotes -- 7 Jan '88 by Peter Fraterdeus
  196. -- Part of the MemoNotesΓäó system
  197. --ΓÇóSends a mouseUp message to any button named "Note" on a card
  198. -- thus toggling the visiblity of the Note Field
  199. --ΓÇóPut this script in your Home Stack, and use Shift-Opt.Click
  200. -- to copy the ShowNotes button, paste in Bkgnd. of your Stack.
  201. set lockscreen to true
  202. MagicCopy
  203. if the shiftKey is down then -- Shift-Click to edit script*
  204. edi