home *** CD-ROM | disk | FTP | other *** search
/ Blender Volume 3 #3 / BLENDER.iso / pc / files / control.dxr / 00008.ls < prev    next >
Encoding:
Text File  |  1997-01-01  |  1.6 KB  |  69 lines

  1. global gOpSys
  2.  
  3. on finishmovie
  4.   global CONTROLWINDOW, CONTROLWINDOW2, gOpSys
  5.   set the modal of window "CONTROL.DIR" to 0
  6.   set the modal of window "CONTROLS.DIR" to 0
  7.   set the modal of window "MENU.DIR" to 0
  8.   set the modal of window "HELP.DIR" to 0
  9.   if objectp(CONTROLWINDOW) then
  10.     forget(CONTROLWINDOW)
  11.   end if
  12.   if objectp(CONTROLWINDOW2) then
  13.     forget(CONTROLWINDOW2)
  14.   end if
  15. end
  16.  
  17. on writeFile
  18.   global trackList, CDDrive
  19.   set volName to "2.5"
  20.   if the machineType = 256 then
  21.     openXLib("FileIo")
  22.   end if
  23.   set prefsPath to findPath()
  24.   set dataString to EMPTY
  25.   repeat with x in trackList
  26.     set dataString to dataString & x & TAB
  27.   end repeat
  28.   if the machineType = 256 then
  29.     if objectp(factory("fileio")) then
  30.       set writeObj to fileio(mnew, "append", prefsPath & "Blendprf")
  31.       writeObj(mWriteString, volName & TAB & dataString & RETURN)
  32.       if objectp(writeObj) then
  33.         writeObj(mdispose)
  34.       end if
  35.       if the machineType = 256 then
  36.         closeXLib("FileIo")
  37.       end if
  38.     end if
  39.   end if
  40. end
  41.  
  42. on findPath
  43.   global MX, CDDrive
  44.   if gOpSys = #WIN then
  45.     openXLib("MISC_X")
  46.   else
  47.     if gOpSys = #MAC then
  48.       openXLib(CDDrive & "FILES:MISC_X XObj")
  49.     end if
  50.   end if
  51.   if not objectp(MX) then
  52.     set MX to misc_x(mnew)
  53.   end if
  54.   if the machineType = 256 then
  55.     set prefsPath to MX(mWindowsDirectory)
  56.   else
  57.     set prefsPath to MX(mPrefsFolder)
  58.   end if
  59.   return prefsPath
  60.   if objectp(MX) then
  61.     MX(mdispose)
  62.   end if
  63.   if the machineType = 256 then
  64.     closeXLib("MISC_X")
  65.   else
  66.     closeXLib(CDDrive & "FILES:MISC_X XObj")
  67.   end if
  68. end
  69.