home *** CD-ROM | disk | FTP | other *** search
/ Discovering Nature in the City / LUONTOCD.iso / pc / files / soundswe.dxr / 00001.ls next >
Encoding:
Text File  |  1996-12-16  |  1.3 KB  |  45 lines

  1. global gRecList, gCount, gString, gnewSound
  2.  
  3. on startMovie
  4.   alert("Stoppa speldisketten (Fallet Naturen) i diskettenheten och v√§lj ljudbandets namn i disketten")
  5.   if the machineType = 256 then
  6.     openXLib("fileio.dll")
  7.     if objectp(readObject) then
  8.       readObject(mdispose)
  9.     end if
  10.     set readObject to fileio(mnew, "?read", "TXT")
  11.     if readObject = -43 then
  12.       forget(window "soundswe")
  13.       exit
  14.     end if
  15.     set gString to readObject(mReadToken, EMPTY, "]")
  16.     readObject(mdispose)
  17.     closeXLib("fileio.dll")
  18.   end if
  19.   if the machineType <> 256 then
  20.     if objectp(readObject) then
  21.       readObject(mdispose)
  22.     end if
  23.     set readObject to fileio(mnew, "?read", "TXT")
  24.     if readObject = -43 then
  25.       forget(window "soundswe")
  26.       exit
  27.     end if
  28.     set gString to readObject(mReadToken, EMPTY, "]")
  29.     readObject(mdispose)
  30.   end if
  31.   if not (gString contains "aif") or (voidp(gString) = 1) then
  32.     alert("Det h√§r √§r inte ljudbandet!")
  33.     forget(window "soundswe")
  34.   else
  35.     put EMPTY into field "list"
  36.     put gString into field "text"
  37.     set gRecList to value(the text of field "text")
  38.     set gCount to count(gRecList)
  39.     repeat with x = 1 to gCount
  40.       put "ljud" && x & RETURN after field "list"
  41.     end repeat
  42.     hilite line 1 of field "list"
  43.   end if
  44. end
  45.