home *** CD-ROM | disk | FTP | other *** search
/ Computer Music Interactif 7 / cd.iso / pc / PC / Demos / GroovMak / data1.cab / Program_Executable_Files / Media / LoadU.dxr / 00044.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  1.8 KB  |  46 lines

  1. on mouseUp
  2.   global gPath, gCD, gFirstLine, gTotLine
  3.   set linea to line the mouseLine of field "fieldOpenFile"
  4.   if the number of lines in linea = 1 then
  5.     if (linea = chars(gPath, 1, offset("\", gPath))) or (linea = gCD) or (linea = "A:\") then
  6.       put linea into field "fieldUserPath"
  7.       put EMPTY into field "fieldOpenFile"
  8.       set temp to DirectoryToList(field "fieldUserPath")
  9.       repeat with i = 1 to count(temp)
  10.         set nome to getAt(temp, i)
  11.         if (the last char in nome = "\") or (chars(nome, length(nome) - 3, length(nome)) = ".wav") then
  12.           put nome & RETURN after field "fieldOpenFile"
  13.         end if
  14.       end repeat
  15.       set the scrollTop of member "fieldOPenFile" to 0
  16.     else
  17.       if the last char in field "fieldUSerPath" <> "\" then
  18.         repeat while the last char in field "fieldUserPath" <> "\"
  19.           delete char -30000 of field "fieldUserPath"
  20.         end repeat
  21.         if soundBusy(1) then
  22.           sound stop 1
  23.         end if
  24.       end if
  25.       put linea after field "fieldUserPath"
  26.       if the last char in linea = "\" then
  27.         put EMPTY into field "fieldOpenFile"
  28.         set temp to DirectoryToList(field "fieldUserPath")
  29.         repeat with i = 1 to count(temp)
  30.           set nome to getAt(temp, i)
  31.           if (the last char in nome = "\") or (chars(nome, length(nome) - 3, length(nome)) = ".wav") then
  32.             put nome & RETURN after field "fieldOpenFile"
  33.           end if
  34.         end repeat
  35.         set the scrollTop of member "fieldOPenFile" to 0
  36.       end if
  37.     end if
  38.     set the foreColor of member "fieldUserPath" to 0
  39.   end if
  40.   if the last char in field "fieldOpenFile" = RETURN then
  41.     delete char -30000 of field "fieldOpenFile"
  42.   end if
  43.   set gFirstLine to 1
  44.   set gTotLine to the number of lines in field "fieldOpenFile"
  45. end
  46.