Description
Returns the index of the current text.
Available in Ted and Fred.
Syntax
dim iIdx = object.GetCurTxtIdx |
object
Required. Object name. Returned by Ted.GetActiveArticle.
Remarks
In Ted: returns the index of the text corresponding or containing the selected element in the article tree window. The returned value ranges from 0 = first text in the article to NTxts-1 = last text in the article. If there is no selected element in the tree window, or if the selected element is the root one, GetCurTxtIdx returns -1.
In Fred: returns the index of the current text. The returned value ranges from 0 = first text in the article to NTxts-1 = last text in the article. If there is no current text, GetCurTxtIdx returns -1.
Example
This script returns the ordinal number of the selected element.
If Ted.HasActiveArticle Then
dim objArticle = Ted.GetActiveArticle
msgbox (objArticle.GetCurTxtIdx)
End If
See also