home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / DXRS / CDXPCW09.DXR / 00006_CDXFindSelection,CDXWhichDatafield.ls < prev    next >
Encoding:
Text File  |  1997-06-25  |  606 b   |  22 lines

  1. on CDXWhichDatafield x
  2.   global CDXSelectedWord, CDXfieldnamesList, CDXDatafield, CDXOperatorList
  3.   repeat with t = 1 to count(x)
  4.     if getAt(getAt(x, t), 2) = CDXSelectedWord then
  5.       set CDXDatafield to getAt(getAt(x, t), 1)
  6.       exit repeat
  7.     end if
  8.   end repeat
  9. end
  10.  
  11. on CDXFindSelection x
  12.   global CDXSelectedWord
  13.   repeat with t = 1 to the number of chars in field x
  14.     if char t of field x <> " " then
  15.       set FirstLetter to t
  16.       exit repeat
  17.     end if
  18.   end repeat
  19.   set LastLetter to the number of chars in field x
  20.   set CDXSelectedWord to char FirstLetter to LastLetter of field x
  21. end
  22.