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

  1. on mouseDown
  2.   if field "fieldElencoSynthCD" <> EMPTY then
  3.     repeat while the mouseDown
  4.       set the memberNum of sprite the clickOn to the number of member "Htransfer all"
  5.       updateStage()
  6.     end repeat
  7.   end if
  8. end
  9.  
  10. on mouseUp
  11.   global gPath, gPathSynth, loadSynthList, folderSynthList
  12.   if field "fieldElencoSynthCD" <> EMPTY then
  13.     cursor(4)
  14.     set the memberNum of sprite the clickOn to the number of member "transfer all"
  15.     updateStage()
  16.     set temp to []
  17.     repeat with i = 1 to the number of lines in field "fieldElencoSynthCD"
  18.       set synth to line i of field "fieldElencoSynthCD"
  19.       if DirectoryExists(gPath & "Synth\" & synth & "\") <> 0 then
  20.         append(temp, synth)
  21.       end if
  22.     end repeat
  23.     if temp <> [] then
  24.       set loadSynthList to []
  25.       set dim to 380 * count(temp)
  26.       if IKGetFreeDiskSpace(chars(gPath, 1, offset("\", gPath))) < (dim + 10000) then
  27.         openWin("Message")
  28.         tell window "Message"
  29.           go("12")
  30.         end tell
  31.       else
  32.         set the foreColor of member "fieldElencoSynthCD" to 0
  33.         repeat with i = 1 to count(temp)
  34.           if length(getAt(temp, i)) > 0 then
  35.             CreateDirectory(gPath & "Synth\" & getAt(temp, i) & "\")
  36.             CopyDirectory(gPathSynth & getAt(temp, i) & "\", gPath & "Synth\" & getAt(temp, i) & "\")
  37.             put getAt(temp, i) into line the lineCount of member "fieldElencoSynth" + 1 of field "fieldElencoSynth"
  38.             append(folderSynthList, chars(getAt(temp, i), 1, length(getAt(temp, i))))
  39.           end if
  40.         end repeat
  41.         sort(folderSynthList)
  42.         put EMPTY into field "fieldElencoSynth"
  43.         repeat with i = 1 to count(folderSynthList)
  44.           put getAt(folderSynthList, i) into line i of field "fieldElencoSynth"
  45.         end repeat
  46.         set the scrollTop of member "fieldElencoSynth" to 0
  47.         set the foreColor of member "fieldElencoSynth" to 0
  48.         set the textFont of field "fieldElencoSynth" to "IK10"
  49.         updateStage()
  50.       end if
  51.     end if
  52.     cursor(-1)
  53.   end if
  54. end
  55.