The following code returns the value of the character at the cursor position in the Editor window:

Function ThisCharacter

   local cIndex

   cIndex = form.EDITOR1.lineNo * form.EDITOR1.columnNo

 return substr( form.EDITOR1.value, cIndex, 1 )