home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1995 November / SHOWCASE.ISO / files / goer.dir / 00002_Script_2 < prev    next >
Text File  |  1995-06-13  |  3KB  |  100 lines

  1.  
  2. -- òò -- Lingo coding by David K. Anderson and Terry R. Schussler -- òò --
  3.  
  4. global gPTimerSet, gPresentationLight, gLightColor
  5.  
  6. on startMovie
  7.   clearGlobals
  8.   set gLightColor = "Green timer light"
  9.   if the colordepth <> 8 then set the colordepth = 8
  10.   set the soundLevel = 5
  11.   InitIntro
  12.   set gPresentationLight = 48
  13.   set the timeoutLength =  36000
  14.   set the timeoutScript = "timeoutProcedure"
  15.   set gPTimerSet = 0
  16.   if the controlDown then
  17.     if the optionDown then
  18.       put "Hi Heidi!" into field "Who to"
  19.     else
  20.       put "Hi Alex!" into field "Who to"
  21.     end if
  22.     go "Set Presentation Time"
  23.     exit
  24.   end if
  25.   if the optionDown then
  26.     put "Company Name" into field "Who to"
  27.     go "Set Presentation Time"
  28.     exit
  29.   end if
  30.   if the commandDown then
  31.     put "Hi Karyn!" into field "Who to"
  32.     go "Set Presentation Time"
  33.     exit
  34.   end if
  35.   if the shiftDown then
  36.     put "Hi Cathy!" into field "Who to"
  37.     go "Set Presentation Time"
  38.     exit
  39.   end if
  40. end
  41.  
  42. -- This handler searches for an empty text file on the CD to determine the correct path to the Director files.
  43. on InitIntro
  44.   global gMyPath, gFile
  45.   set the searchCurrentFolder = 0
  46.   if the machinetype = 256 then
  47.     -- Creat a list of potential drive names to be used when searching for the CD-ROM drive.
  48.     set PathList = ["C:\FILES\", "D:\FILES\", "E:\FILES\",  "F:\FILES\", ¼
  49. "G:\FILES\", "H:\FILES\", "I:\FILES\", "J:\FILES\", "K:\FILES\", "L:\FILES\", "M:\FILES\", "N:\FILES\", "O:\FILES\", "P:\FILES\", "Q:\FILES\", "R:\FILES\", "S:\FILES\", "T:\FILES\", "U:\FILES\", "V:\FILES\", "W:\FILES\", "X:\FILES\", "Y:\FILES\", "Z:\FILES\", "EOL"]
  50.     set gMyPath = "D:\FILES\"
  51.     repeat with x = 1 to count(PathList)
  52.       set gMyPath = getAT(PathList, x)
  53.       set foo = ReadCDTestFile()
  54.       put foo && "Reading from disk:" && getAT(PathList, x)
  55.       if foo then exit repeat
  56.       if gMyPath = "EOL" then CantFindCD
  57.     end repeat
  58.   else
  59.     set gMyPath = "SHOWCASE:FILES:"
  60.     set foo = ReadCDTestFile()
  61.     put foo
  62.     if NOT foo then CantFindCD
  63.   end if
  64. end
  65.  
  66. -- This handler uses the FileIO XObject to determine whether the text file exists on the selected disk.
  67. on ReadCDTestFile
  68.   global gFile, gMyPath, gTheProblem
  69.   put "READ CD ROUTINE"
  70.   if objectP(gFile) then gFile(mDispose)
  71.   if the machineType = 256 then
  72.     set TestPath = gMyPath & "CDLOCALE.TXT"
  73.   else
  74.     set TestPath = gMyPath & "CDLOCALE.TXT"
  75.   end if
  76.   set gFile = fileIO(mNew, "read", TestPath)
  77.   if NOT objectp( gFile ) then 
  78.     put "NOT found"
  79.     return FALSE
  80.   else
  81.     gFile(mDispose)
  82.     put "Found!"
  83.     setAt the searchpath 1, gMyPath
  84.     return TRUE
  85.   end if
  86. end
  87.  
  88. -- If the file can't be found, give up and go home.
  89. on CantFindCD
  90.   if the machinetype = 256 then
  91.     alert "You don't seem to have the Showcase CD-ROM loaded!  Please make sure ¼
  92. the CD is in the drive." & RETURN & RETURN & "Then restart the application."
  93.   else
  94.     alert "You don't seem to have the Showcase CD-ROM loaded!  Please make sure ¼
  95. the CD is in the drive and that the" && QUOTE & "Showcase"  & QUOTE && "icon appears on the desktop." & RETURN & RETURN & "Then restart the application."
  96.   end if
  97.   quit
  98. end
  99.  
  100.