This discussion is archived
4 Replies Latest reply: May 25, 2012 2:48 AM by gimbal2 RSS

Is there a way to get the text written into a text object in an AWTFrame

884533 Newbie
Currently Being Moderated
I am trying to get the text written into the text box in the AWTFrame.
I have tried the following:

<pre> AccessibleTextInfo acinfo;
     AccessibleContextInfo actinfo;
     AccessibleTextItemsInfo acttinfo;
     actinfo = getContextInfoFromContext(ac);
     GetAccessibleTextInfo(vmID,ac,&acinfo,actinfo.x,actinfo.y);
     printf("char count =%i\n",acinfo.charCount);
     printf("OK so far\n");
     GetAccessibleTextRange(vmID,ac,0,MAX_STRING_SIZE,sData,MAX_STRING_SIZE);
     printf("text =%s\n",sData);</pre>

The charCount is correct but the string returned is always null.
Is this the right way to do this. If not then is there a correct way to get the text from a text box.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points