InDesign CS4 get next item after selected text

I have seen similar posts, but not quite the same.
I am trying to do a test on the next character that exists after a found item using find/change.

I am sure it isn’t difficult, but I am not sure how to convert the object reference of the selected text into its character position in a word?

This is what I have thus far.

tell application "Adobe InDesign CS4"
	activate
	set find what of find text preferences to nothing
	set change to of change text preferences to nothing
	set find what of find text preferences to ".."
	
	
	set FoundText to find text
	repeat with anItem in FoundText
		set selection to character 2 of anItem
		set theLetter to object reference of selection
		set theWord to word 1 of anItem
		
		--Here I would like to try and select the next character in the word and test if it is a period. If it is not I would like to do something
		set theCount to count of theLetter of theWord
		display dialog theCount as string
		
	end repeat
	
	set find what of find text preferences to nothing
	set change to of change text preferences to nothing
end tell

You want the index property, which is the offset of text from the beginning of its parent story.

Hey, Jeff. You don’t really need the character position (index), as you can obtain text relative to the position of the reference.


tell application "Adobe InDesign CS4"
   set find what of find text preferences to nothing
   set change to of change text preferences to nothing
   set find what of find text preferences to ".."
   tell document 1 to repeat with x in find text
if not ((word after x)'s character 1 is ".") then beep
end repeat
   set find what of find text preferences to nothing
   set change to of change text preferences to nothing
end tell