Good observations and catches! I was cleaning up unnecessary lines within the code, which I have found to work. Evidently, I inadvertently deleted the declaration of the i integer variable, like Int i Regarding setting the COM object to Null, it is not supposed to be necessary, and evidence supports this, yet there is no harm to it, and it may minimize the risk of memory leaks. Jamal On Thu, 22 May 2008, Cohn, Jonathan C [IT] wrote: > Date: Thu, 22 May 2008 18:34:34 -0500 > From: "Cohn, Jonathan C [IT]" <Jonathan.C.Cohn@xxxxxxxxxx> > Reply-To: jawsscripts@xxxxxxxxxxxxx > To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx> > Subject: [jawsscripts] Re: Getting text in an edit field > > Two questions: > 1. What is 'I' set to, I read the function three times and I only see i= t =3D > in the function call and not declared. > 2. Why is it necessary to set the object to null before returning the st= ri=3D > ng? Shouldn't the object just get cleared? > > Thanks, > > Jon > > > > Jonathan Cohn > Application Developer > Sprint > > -----Original Message----- > From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@freelis= ts=3D > .org] On Behalf Of Jamal Mazrui > Sent: Thursday, May 22, 2008 6:11 PM > To: jawsscripts@xxxxxxxxxxxxx > Subject: [jawsscripts] Re: Getting text in an edit field > > Below is a function that may help (from the Homer Script Library). It > assumes that MSAA constants have been included, e.g., via msaa.jsh > > Jamal > > String Function EditGetText(Handle h) > ;Get text from an edit control via its window handle > ' Seems like a max of 4K is returned > > Var > Dim o, oNull, > String sReturn > > Let o =3D3D GetObjectFromEvent(h, msaa_OBJID_CLIENT, 1, i) > Let sReturn =3D3D o.AccValue > > Let o=3D3D oNull > Return sReturn > EndFunction > > > __________? > View the list's information and change your settings at > http://www.freelists.org/list/jawsscripts > > > > __________=A0 > View the list's information and change your settings at > http://www.freelists.org/list/jawsscripts > __________ View the list's information and change your settings at http://www.freelists.org/list/jawsscripts