home *** CD-ROM | disk | FTP | other *** search
- on GetPeople
- global mpath
- set ftype to "txt"
- set fileList to []
- repeat with i = 1 to the maxinteger
- set n to getNthFileNameInFolder(mpath, i)
- if n = EMPTY then
- exit repeat
- end if
- set the itemDelimiter to "."
- if item 2 of n = ftype then
- if (the number of chars in n > 4) or ((the number of chars in n = 4) and (char 1 to 2 of n <> "CU") and (char 1 to 2 of n <> "SC")) then
- append(fileList, item 1 of n)
- end if
- end if
- set the itemDelimiter to ","
- end repeat
- set num to count(fileList)
- set txtfilelist to []
- repeat with i = 1 to num
- set tmp to getAt(fileList, i)
- set tmpnum to Bsearch(tmp, "MakerList")
- if tmpnum > 0 then
- put tmp into item 3 of line tmpnum of field "MakerFileNames"
- next repeat
- end if
- put "problem with: " && tmp
- end repeat
- if 1 then
- set the text of field "Filenames" to " "
- set the text of field "Filenames2" to " "
- if num > 25 then
- repeat with i = 1 to 25
- set tmp to getAt(fileList, i)
- put item 1 of tmp into line the number of lines in field "filenames" + 1 of field "Filenames"
- end repeat
- repeat with i = 26 to num
- set tmp to getAt(fileList, i)
- put item 1 of tmp into line the number of lines in field "filenames2" + 1 of field "Filenames2"
- end repeat
- else
- repeat with i = 1 to num
- set tmp to getAt(fileList, i)
- put item 1 of tmp into line the number of lines in field "filenames" + 1 of field "Filenames"
- end repeat
- end if
- end if
- end
-
- on DoIndex
- global mpath
- set fileList to []
- repeat with i = 1 to the maxinteger
- set n to getNthFileNameInFolder(mpath, i)
- if n = EMPTY then
- exit repeat
- end if
- append(fileList, n)
- end repeat
- set num to count(fileList)
- set txtfilelist to []
- repeat with i = 1 to num
- set tmp to getAt(fileList, i)
- set the itemDelimiter to "."
- if item 2 of tmp = "TXT" then
- add(txtfilelist, tmp)
- end if
- set the itemDelimiter to ","
- end repeat
- put txtfilelist
- set num to count(txtfilelist)
- repeat with i = 1 to num
- MakeIndex(getAt(txtfilelist, i))
- end repeat
- end
-