home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- global gPath, gCD, gFirstLine, gTotLine
- set linea to line the mouseLine of field "fieldOpenFile"
- if the number of lines in linea = 1 then
- if (linea = chars(gPath, 1, offset("\", gPath))) or (linea = gCD) or (linea = "A:\") then
- put linea into field "fieldUserPath"
- put EMPTY into field "fieldOpenFile"
- set temp to DirectoryToList(field "fieldUserPath")
- repeat with i = 1 to count(temp)
- set nome to getAt(temp, i)
- if (the last char in nome = "\") or (chars(nome, length(nome) - 3, length(nome)) = ".wav") then
- put nome & RETURN after field "fieldOpenFile"
- end if
- end repeat
- set the scrollTop of member "fieldOPenFile" to 0
- else
- if the last char in field "fieldUSerPath" <> "\" then
- repeat while the last char in field "fieldUserPath" <> "\"
- delete char -30000 of field "fieldUserPath"
- end repeat
- if soundBusy(1) then
- sound stop 1
- end if
- end if
- put linea after field "fieldUserPath"
- if the last char in linea = "\" then
- put EMPTY into field "fieldOpenFile"
- set temp to DirectoryToList(field "fieldUserPath")
- repeat with i = 1 to count(temp)
- set nome to getAt(temp, i)
- if (the last char in nome = "\") or (chars(nome, length(nome) - 3, length(nome)) = ".wav") then
- put nome & RETURN after field "fieldOpenFile"
- end if
- end repeat
- set the scrollTop of member "fieldOPenFile" to 0
- end if
- end if
- set the foreColor of member "fieldUserPath" to 0
- end if
- if the last char in field "fieldOpenFile" = RETURN then
- delete char -30000 of field "fieldOpenFile"
- end if
- set gFirstLine to 1
- set gTotLine to the number of lines in field "fieldOpenFile"
- end
-