home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 2 / BBS in a box - Trilogy II.iso / Files / Hyper / Q-R / ResGenie™ 1.0 / ResGenie™ / ResGenie™.rsrc / TEXT_211_holdstacknamert.txt < prev    next >
Encoding:
Text File  |  1993-08-02  |  2.6 KB  |  72 lines

  1. put what into process
  2. repeat with x = 1 to the number of chars in process
  3. get char x of process
  4. if it is ";" then put "," into char x of process
  5. end repeat
  6. if word 1 of process is "Deleted:" then
  7. beep
  8. do restext("TEXT", "Exit", colorauthoringpath)
  9. end if
  10. if word 1 of process is "Added:" then delete word 1 of process
  11. if item 1 of process is "PICT" then
  12. if item 2 of process is "<unnamed>" then put item 3 of process into Preview
  13. else
  14. put item 2 of process into Preview
  15. end if
  16. picture Preview ,  resource, windoid, true
  17. end if
  18. if item 1 of process is "snd " then
  19. if item 2 of process is not "<unnamed>" then
  20. put item 2 of process into TheSound
  21. play TheSound
  22. do restext("TEXT", "Exit", colorauthoringpath)
  23. end if
  24. put selectedline of window where into replaceline
  25. put the text of window where into theTEXT
  26. put item 1 of process into whatKind
  27. put item 2 of process into itsoldName
  28. put item 3 of process into itsID
  29. do showdialog 2, "505", , ,  "Untitled"
  30. if the result is empty then do restext("TEXT", "Exit", colorauthoringpath)
  31. put line 1 of the result into newname
  32. do put FullResList("T=snd ", "O=N", "W=" & thestack) into check
  33. do get offset (newname, check)
  34.  
  35. if it is "0" then
  36. do  RenameRes(thestack, itsID, whatkind, itsoldName, newname)
  37. put  newName into item 2 of process
  38. put process into line replaceline of theText
  39. set the text of window where to theTEXT
  40. put item 2 of process into TheSound
  41. do stop using stack thestack
  42. do start using stack thestack
  43. play TheSound
  44. do restext("TEXT", "Exit", colorauthoringpath)
  45. end if
  46. if it is not "0" then
  47. do showdialog 1, "506","You must have a unique name for your sound in order for HyperCard to play it predictably. Please try another name." , "True"
  48. if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)
  49. if the result is "1" then
  50. repeat
  51. do showdialog 2, "505", , ,  "Untitled"
  52. if the result is empty then do restext("TEXT", "Exit", colorauthoringpath)
  53. if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)
  54. put line 1 of the result into newname
  55. do put FullResList("T=snd ", "O=N" , "W=" & thestack) into check
  56. do get offset (newname, check)
  57. if it is  "0" then
  58. do  RenameRes(thestack, itsID, whatkind, itsoldName, newname)
  59. put  newName into item 2 of process
  60. put process into line replaceline of theText
  61. set the text of window where to theTEXT
  62. do stop using stack thestack
  63. do start using stack thestack
  64. do put newname into TheSound
  65. do play TheSound
  66. do restext("TEXT", "Exit", colorauthoringpath)
  67. end if
  68. if it is  not "0" then do showdialog 1, "506","You must have a unique name for your sound in order for HyperCard to play it predictably. Please try another name.", "True"
  69. end repeat
  70. end if
  71. end if
  72. end if