如何比较两个滚动字段

How to compare two scrolling field

如何比较两个滚动字段(我有两个字段,一个包含一些文本,另一个包含搜索字符串和替换字符串,它们用冒号分隔。我想在第一个滚动字段中搜索每个单词,在第二个滚动字段中搜索字符串滚动字段,如果在第一个滚动字段中找到搜索字符串,则 return 第一个滚动字段中搜索字符串的特定单词和计数)

on mouseUp

   put  the fld  "MytextField" into myHtmll
   put the field SRText into myArrayT
   split myArrayT by CR
   put the number of lines of (the keys of myArrayT) into myArrayl
   repeat with j=1 to myArrayl
      put  myArrayT[j] into k 
      split k by colon
      put k[1] into searchStr1
      put k[2] into replaceStr1
   end repeat

   repeat for each word  dd in field "MytextField"
      if dd contains searchStr1 then
         --put Wordss after mm
         --answer searchStr1
         answer ok
      end if
      answer searchStr
   end repeat

end mouseU

这里"MytextField"是第一个滚动字段 这里"SRText"是第二个滚动字段

   on mouseUp
   set the caseSensitive to true
   put the field SRText into myArrayT
   split myArrayT by CR
   put the number of lines of (the keys of myArrayT) into myArrayl
       put 0 into tmp
    repeat for each key j in myArrayT
      put  myArrayT[j] into k 
      split k by colon


      put k[1] into searchStr1
      put the field "MytextField" into sss
      repeat for each word ass in sss

         if ass contains  searchStr1 then
            add 1 to tmp
            put ass after sam




         end if
      end repeat

   end repeat
   answer sam
      answer tmp
end mouseUP