[CALC] Read Mouse Screen coordinates and click anywhere

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
ahlidap
Posts: 1
Joined: Thu Dec 28, 2017 4:12 pm

[CALC] Read Mouse Screen coordinates and click anywhere

Post by ahlidap »

Hello all,

I'm relatively new to Basic, but I already have the skeletons of most things I need.
Only missing part it: Clicking.

I want to build something in Calc, that is capable of clicking outside the Calc window itself.

I will have a form for configuring the clicker coordinates, where I will have an input field with a keypress listener.
Anytyme I press some key ('r' for example) on that input field, it should read and store the mouse coordinates, wherever it is on the screen (so, even if it's outside calc).

Then I will "move and click" the mouse to stored coordinates.


I can achieve this easely in JAVA using java.awt.MouseInfo and java.awt.Robot, but after some research I have no idea how I can do this in Calc.
I can read mouse click coordinates if I click a button in a form for example, but it's a click, and coordinates are related to that button.


Is this possible to implement?


Many thanks in advance.
Regards,
LibreOffice 4 & 5 under LINUX
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [CALC] Read Mouse Screen coordinates and click anywhere

Post by Villeroy »

This is a user forum. Hardly anybody here can tell if this is possible.
http://www.openoffice.org/api/docs/comm ... le-ix.html might look familiar to you.
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
Post Reply