Re: FW: [program-l] NVDA add-on development questions


Javi Domínguez
 

Hello, Adil.

I think that's a typical beginner mistake. You've done:

editBox = api.getFocusObject ()

and you thin that editBox it is the authentic, original object, that of the applicationn but no, editBox is a virtual object created by NVDA with the attributes that it has been able to extract from the application object.

All NVDAObjects are reflections of the original objects, you can't act on the object of the application modifying the NVDA objects.

If you do:

editBox.value = "some text

you make the user see "some text", but the edit box in the screen, the reflected object, the source, I don't know how to say it, doesn't change.

So you have to call the operating system through the winUser module, as James has explained to you.

This is what I think but there are people here who know much more than I do. Correct me if I'm wrong, please.

Greetings

Javi Dominguez


El 15/05/2020 a las 20:44, Adil Shaikh escribió:
thanks to everyone who answered my query. 
I got that part of the add-on working. now, I am trying to add the selected text to a third party application.  initially, I  was considering to use clipboard to pass the selected text to third party application by just using simple copy and paste. but it doesn't feel quite right to me as it messes up with the clipboard content.  
I've already tried this code:
editBox = api.getFocusObject ()
editBox.value = "some text
it's not working. 

thanks josephly for forwarding my post to this mailing list. 


Join nvda-addons@nvda-addons.groups.io to automatically receive all group messages.