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_169_Rename.txt < prev    next >
Encoding:
Text File  |  1993-08-02  |  2.7 KB  |  62 lines

  1. global colorauthoringpath
  2.   global MoveFileOne
  3.   global MoveFileTwo
  4.   global MovePathOne
  5.   global MovePathTwo
  6.   if there is a window movefileone then close window movefileone
  7.   if there is a window movefiletwo then close window movefiletwo
  8.   put empty into MovePathOne
  9.   put empty into MovePathTwo
  10.   global RenameFileName
  11.   global RenamefilePath
  12.   if there is a window RenameFileName then close window RenameFileName
  13.   showdialog 1, "504","Rename resources in this stack or in another file (of any type)?" ,"True"
  14. if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)
  15.   if the result is "1" then
  16.     put  the long name of this stack into RenameFileName
  17.     delete word 1 of RenameFileName
  18.     delete char 1 of RenameFileName
  19.     delete the last char of RenameFileName
  20.     put renamefilename into renamefilepath
  21.     put "Rename: " before char 1 of RenameFileName
  22.     if the short name of this stack is "Resgenie‚Ñ¢" then
  23.       showdialog 1, "503","Please use Resedit to edit these files. Sorry, but it's for your own good!" ,"True"
  24.       do restext ("TEXT", "Exit", colorauthoringpath)
  25.     end if
  26.     put FullResList("T=ALL", "O=TNIS", "W=" & renamefilepath) into resdata
  27.     if word 1 of resdata is "Error" then
  28.       answer resdata
  29.       do restext ("TEXT", "Exit", colorauthoringpath)
  30.     end if
  31.     set cursor to watch
  32.     do sort resdata
  33.     if the number of lines of resdata is 1 then put return & "       " after line 1 of resdata
  34.     do  Listoid  RenameFileName, resdata, "one","Rename:","black,yellow", "Chicago", "12", "0", "250, 10"
  35.   end if
  36.   if the result is "3" then
  37.     answer file "Rename resources in any file:"
  38.     if it is empty then  do restext ("TEXT", "Exit", colorauthoringpath)
  39.     put it into RenamefilePath
  40.     put RenamefilePath into process
  41.     set cursor to watch
  42.     put  FullResList("T=ALL", "O=TNIS", "W=" & RenamefilePath) into resdata
  43.     if word 1 of resdata is "Error" then
  44.       answer resdata
  45.       do restext ("TEXT", "Exit", colorauthoringpath)
  46.     end if
  47.     do sort resdata
  48.     put the last char of process into RenameFileName
  49.     delete last char of process
  50.     repeat until it is ":"
  51.       get the last char of process
  52.       if it is not ":" then  put it before char 1 of RenameFileName
  53.       delete the last char of process
  54.     end repeat
  55.     if RenameFileName is "Resgenie‚Ñ¢" then
  56.       showdialog 1, "503","Please use Resedit to edit these files. Sorry, but it's for your own good!" ,"True"
  57.       do restext ("TEXT", "Exit", colorauthoringpath)
  58.     end if
  59.     put "Rename: "  before char 1 of RenameFileName
  60.     if the number of lines of resdata is 1 then put return & "      " after line 1 of resdata
  61.     do Listoid RenameFileName, resdata, "one","Rename:","black,yellow", "Chicago", "12", "0", "250, 10"
  62.   end if