home *** CD-ROM | disk | FTP | other *** search
/ Great Canadian Scientists / GCS_CD.iso / mac / PC / GCSData / databa_o.dxr / 00050_DatabaseCopy.ls < prev    next >
Encoding:
Text File  |  1996-09-21  |  1.2 KB  |  55 lines

  1. on HideDBCopy
  2.   global TempMouseDown, TempMouseUp, TempKeyDown, ButtonsActive
  3.   cursor(4)
  4.   if not voidp(TempMouseDown) then
  5.     set the mouseDownScript to TempMouseDown
  6.   end if
  7.   if not voidp(TempMouseUp) then
  8.     set the mouseUpScript to TempMouseUp
  9.   end if
  10.   if not voidp(TempKeyDown) then
  11.     set the keyDownScript to TempKeyDown
  12.   end if
  13.   set ButtonsActive to 1
  14.   set the visible of sprite 31 to 0
  15.   cursor(-1)
  16. end
  17.  
  18. on ShowDBCopy
  19.   global TempMouseDown, TempMouseUp, TempKeyDown, ButtonsActive
  20.   set TempMouseDown to the mouseDownScript
  21.   set TempMouseUp to the mouseUpScript
  22.   set TempKeyDown to the keyDownScript
  23.   set the mouseDownScript to "DBUp"
  24.   set the mouseUpScript to "HideDBCopy"
  25.   set the keyDownScript to "DBKeyCheck"
  26.   set ButtonsActive to 0
  27.   set the visible of sprite 31 to 1
  28.   cursor(-1)
  29. end
  30.  
  31. on DBCopyPrep
  32.   set the puppet of sprite 31 to 1
  33.   set the castNum of sprite 31 to the number of member "DBCopy"
  34. end
  35.  
  36. on Copy
  37.   set Temp to the castNum of sprite 3
  38.   put the text of cast Temp & the text of cast (Temp - 300) into field 300
  39.   copyToClipBoard(cast 300)
  40.   ShowDBCopy()
  41. end
  42.  
  43. on DBUp
  44.   dontPassEvent()
  45. end
  46.  
  47. on DBKeyCheck
  48.   put the key
  49.   if the key = RETURN then
  50.     HideDBCopy()
  51.   else
  52.     pass()
  53.   end if
  54. end
  55.