home *** CD-ROM | disk | FTP | other *** search
/ The Trains of North America / TRAINS_PC.ISO / pc / data.1 / LINGO.INI < prev    next >
Encoding:
Text File  |  1996-06-25  |  2.1 KB  |  67 lines

  1. -- This is the text file LINGO.INI.  It is designed
  2. -- to tell Director for Windows what Xtras, XObjects, or
  3. -- DLLs should be loaded when starting DIRECTOR.EXE.
  4.  
  5. -- You should have a copy of this file and the associated
  6. -- DLL file (for example, FILEIO.DLL) in the same 
  7. -- location as any Projector you wish to distribute.
  8. -- Otherwise, the Projector will not be able to utilize
  9. -- the features of the DLL you want to use.
  10.  
  11. -- To comment out one of the lines below, use two dashes (--)
  12. -- as in the beginning of these lines.
  13.  
  14. -- Loaded are:
  15. -- FILEIO.DLL, for file input and output
  16.  
  17. on startup
  18.     put "Now loading LINGO.INI"&&the date&&the time
  19.     put "This computer is running in "&& the colorDepth &"-bit color depth."
  20. --  set the centerStage to TRUE
  21.     openxlib "fileio"
  22.     -- Following line prevents crashes on Windows systems when using math functions 
  23.     -- such as power or log and passing bogus or extremely large/small values.
  24.     -- Invoking the float->string conversion code  with a valid value prevents
  25.     -- future crashes in this routine.  drs  1mar96 
  26.     if string(0.0)="a" then nothing
  27.  
  28. -- add code to check for drive
  29.  
  30.  
  31. -- Startup utility to assist in finding search path
  32. -- 
  33.  
  34.   if the machineType = 256 then
  35.     set myCD to EMPTY
  36.     -- Attempt to find files by updating search path
  37.     -- and appending CD-ROM
  38.     put CheckDrive("trainsreo.txt") into myCD
  39.     set tempString to myCD&"TrainDat\"
  40.     setAt the searchPath, 1, tempString    
  41.   else
  42.     -- on the macintosh this should be automatic
  43.     setAt the searchPath, 1, "TrainDat:"
  44.   end if
  45.  
  46.  
  47. end startup
  48.  
  49. on CheckDrive weirdfil
  50.   -- Note: use your actual filename instead of "weirdfil" 
  51.   -- throughout this handler
  52.   repeat with I = 66 to 90
  53.     set drive = numToChar( I )
  54.     set myThisPath = string(drive & ":\"& weirdfil)
  55.     set myFile = fileIO(mNew, "read", myThisPath)
  56.     if objectP(myFile) then
  57.       myFile(mDispose)
  58.       return drive&":"
  59.       exit
  60.     end if 
  61.   end repeat
  62.   alert "Please check that"&"E&weirdfil"E&&"is on your¨
  63.  CD drive. Video might not work without the drive inserted"
  64.   
  65. end
  66.  
  67.