Selecting, Copy text from textbox on a HSQLDB based form

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
dreamquartz
Posts: 896
Joined: Mon May 30, 2011 4:02 am

Selecting, Copy text from textbox on a HSQLDB based form

Post by dreamquartz »

Hi All,

Question: "Where can I find info creating a Macro about what and how to select a text in a text box with a button, so it can be pasted in a program outside of LO?
I handle many forms, but the question came up on selecting and copying the full Address, as shown in a Text Box, to the Calendar used in Thunderbird?
The Client stores all the Client info in a DataBase, but at this point in time there is not really a budget for further development.

Any suggestions on how to put it in a Macro are also appreciated.

Thanks in advance,

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 24.04 LTS.
User avatar
Villeroy
Volunteer
Posts: 31344
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Selecting, Copy text from textbox on a HSQLDB based form

Post by Villeroy »

Focus in text box
Ctrl+A
Ctrl+C
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
dreamquartz
Posts: 896
Joined: Mon May 30, 2011 4:02 am

Re: Selecting, Copy text from textbox on a HSQLDB based form

Post by dreamquartz »

Thanks....
One way or the other that does not seem to work, trying to record a Macro. I can record a Macro in Writer, but doing the same with a Text Box, that does not work. It appears that a Text Box in a for. Is not the same as textvin Writer. Where can I find info about objects that handle Text boxes was my initial thought so that I can learn about using that in other situations as well


Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 24.04 LTS.
JeJe
Volunteer
Posts: 3064
Joined: Wed Mar 09, 2016 2:40 pm

Re: Selecting, Copy text from textbox on a HSQLDB based form

Post by JeJe »

The macro doesn't record when the focus is in a forms control textbox in Writer but you can record the same key presses when the focus is in the main document and they will work when instead the focus is in the textbox.


Edit:

Or, in a Writer document with one forms control textbox:

Code: Select all

msgbox thiscomponent.drawpage.getbyindex(0).control.string
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Bidouille
Volunteer
Posts: 641
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Selecting, Copy text from textbox on a HSQLDB based form

Post by Bidouille »

dreamquartz wrote: Sat Jun 07, 2025 7:24 pm Where can I find info about objects
Xray or MRI is your friend :)
Post Reply