home *** CD-ROM | disk | FTP | other *** search
/ Webster's Millennium Amer…Sign Language Dictionary / ASL.ISO / mac / SHARED.cst / 00026_Script_26 < prev    next >
Text File  |  2001-09-17  |  3KB  |  85 lines

  1. --∂ï
  2. -- modify this to work with <tell window "dData">
  3. on cats
  4.   set castOffset=29
  5.   set cNums=["17","09","04","01","02","15","19","11","12","03","13","14","20","06","21","05","07","08","10","18","16"]
  6.   repeat with i = 1 to count(cNums)
  7.     put "" into catVar
  8.     put getAt(cNums,i) into catRef
  9.     repeat with j = 5001 to 5001+2180
  10.       set the itemDelimiter to "*"
  11.       if item 5 of the text of cast j contains catRef then put the name of cast j&return after catVar
  12.     end repeat
  13.     put catvar into field i+castOffset
  14.     --halt
  15.   end repeat
  16.   set the itemDelimiter to ","
  17. end cats
  18.  
  19. on cNames
  20.   set catNames=""
  21.   repeat with i = 30 to 50
  22.     put the name of cast i &return after catNames
  23.   end repeat
  24.   set the text of cast 29 to catNames
  25. end cNames
  26.  
  27. on bigHint --item 12
  28.   global gWordList
  29.   put 0 into hintSize
  30.   set the itemDelimiter to "*"
  31.   repeat with i = 1 to count(gWordList)
  32.     set cstNum = i+5000
  33.     tell window "dData" to put the text of cast cstNum into dataVar
  34.     put item 12 of dataVar into hintText
  35.     if the number of chars of hintText > hintSize and not (cstNum = 6230) then 
  36.       set hintSize = the number of chars of hintText
  37.       set bigHint = hintText
  38.       set hintCast = cstNum
  39.     end if
  40.   end repeat
  41.   set the itemDelimiter to ","
  42.   --put hintSize&&bigHint&&"cast-"&hintCast
  43. end 
  44.  
  45. --cast-6230; name
  46.  
  47. on smallHint --item 12
  48.   global gWordList
  49.   put 9999 into hintSize
  50.   set the itemDelimiter to "*"
  51.   repeat with i = 1 to count(gWordList)
  52.     set cstNum = i+5000
  53.     tell window "dData" to put the text of cast cstNum into dataVar
  54.     put item 12 of dataVar into hintText
  55.     if the number of chars of hintText < hintSize then 
  56.       set hintSize = the number of chars of hintText
  57.       set bigHint = hintText
  58.       set hintCast = cstNum
  59.     end if
  60.   end repeat
  61.   set the itemDelimiter to ","
  62.   --put hintSize&&bigHint&&"cast-"&hintCast
  63. end 
  64.  
  65. --cast-6230; name
  66.  
  67.  
  68. ----PETEMACK 06.27.01
  69. --on HintList 
  70. --  global gHintList,gWordList
  71. --  set gHintList = [:]
  72. --  set the itemDelimiter to "*"
  73. --  repeat with i = 1 to count(gWordList)
  74. --    set cstNum = i+5000
  75. --    tell window "dData" to put item 12 of the text of cast cstNum into hintText    
  76. --    tell window "dData" to put the name of cast cstNum into aWord
  77. --    AddProp gHintList, the number of chars of hintText, aWord
  78. --  end repeat
  79. --  set the itemDelimiter to ","
  80. --  sort(gHintList)
  81. --  set aFile = fileio(mNew,"?write","Untitled")
  82. --  aFile(mWriteString,string(gHintList))
  83. --  aFile(mDispose)
  84. --  --put gHintList
  85. --end