MACROMEDIA DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR Manual de usuario Pagina 37

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 63
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 36
Use the list commands to index Director text chunks for operations where you otherwise would
have to refer back to the text itself. For instance you can use GetListOfWords to speed up a
proximity search (word 1 within so many words of word 2). List commands like:
if getAt(wordList,5) = secondword
are faster than text chunk commands like:
if word 5 of field "whatever" = secondword
GetListOfWords(sourceString) - where sourceString is the string to operate on. Returns a list of
character chunks delimited by white space or empty list if there was an error. Returns a list of
character chunks in the string delimited by white space. White space includes TAB(9),
Linefeed(10) and Return(13).
Example:
on makeIndex thestring
-- Create an alphabetical index of the words
-- in a text chunk
--
set index = [:]
set thestring = ToLowerCase(thestring)
set wordList = GetListOfWords(thestring)
if TC_GetLastError() = 0 then
set numWords = count(wordList)
repeat with w = 1 to numWords
set thisword = getAt(wordList,w)
if voidP(getaprop(index,thisword)) then
addprop index,thisword,list(w)
Online Help
37
Vista de pagina 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 62 63

Comentarios a estos manuales

Sin comentarios