FStrGet

FStrGet

Call this function to receive extended information about a string. Can be used in conjunction with IsFontBold and IsFontItalic.

Function FStrGet(line_num, from_pos, to_pos)

Parameters:
numeric  line number - the line to be tested
numeric  from - position of record to begin the test
numeric  to - position of record to end the test

Return value:
variant text - the text tested
array segments - the starting points of the segments in the text
array length - the number of characters or spaces between the segments
boolean font ID - if true, the font match the ID it is being tested for (either bold or italic); if false, it does not match the ID

VB sample

Function OnRecord

      r = this.GetLineNumber
      if r <> 10 and r<>15 then exit function 'looks at lines 10 and 15

      a = this.FStrGet(r, 1, 10)

      c = ""
      for i = 1 to ubound(a)

           for j = 0 to ubound(a(i))
                c = c & a(i)(j) & ","
           next
           c= c & "|"
      next

      target.Message this.IsFontBold(a(3)(0))

End Function

Comments