home *** CD-ROM | disk | FTP | other *** search
/ PC Action 1997 January / PCA0197.ISO / demos / ambe / demo.exe / demo.dxr / 00001.ls next >
Encoding:
Text File  |  1996-10-18  |  1.6 KB  |  54 lines

  1. on enterFrame
  2.   global testData, gCPU, oPatchManager
  3.   if the machineType = 256 then
  4.     set gCPU to #PC
  5.   else
  6.     set gCPU to #Mac
  7.   end if
  8.   set oldDelim to the itemDelimiter
  9.   set the itemDelimiter to "/"
  10.   set today to the short date
  11.   delete item 3 of today
  12.   set the itemDelimiter to oldDelim
  13.   if 0 then
  14.     if gCPU = #PC then
  15.       set testData to FileIO(mnew, "?write", "AMBER_00.DAT")
  16.     else
  17.       set testData to FileIO(mnew, "?write", "AMBER data. " & today)
  18.     end if
  19.   else
  20.     set testData to 0
  21.   end if
  22.   if objectp(testData) then
  23.     if gCPU <> #PC then
  24.       testData(mSetFinderInfo, "TEXT", "R*ch")
  25.     end if
  26.     testData(mWriteString, "ΓÇóΓÇóΓÇó Test data: " & the date & ", " & the time & " ΓÇóΓÇóΓÇó" & RETURN)
  27.     testData(mWriteString, "  Projector: " & the movieName & RETURN)
  28.     testData(mWriteString, "  Partition: " & the memorysize & " bytes (" & the memorysize / 1024 & " K)" & RETURN)
  29.     testData(mWriteString, "  Remaining after projector startup: " & the freeBytes & " bytes (" & the freeBytes / 1024 & " K)" & RETURN)
  30.   end if
  31.   set patchFile to #None
  32.   repeat with fNum = 1 to the maxinteger
  33.     set fName to getNthFileNameInFolder(the pathName, fNum)
  34.     if fName = EMPTY then
  35.       exit repeat
  36.     end if
  37.     if fName contains "AJBPATCH." then
  38.       set patchFile to fName
  39.     end if
  40.   end repeat
  41.   if stringp(patchFile) then
  42.     set the visible of window patchFile to 0
  43.     if count(the windowList) = 0 then
  44.       alert("Can't read patch file, probably corrupted")
  45.       exit
  46.     end if
  47.     tell window patchFile
  48.       set oPatchManager to birth(script "cPatchManager")
  49.     end tell
  50.     forget(window patchFile)
  51.   else
  52.   end if
  53. end
  54.