[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: It is possible to emulate the mouse click?


On Sat, 13 Apr 2024 at 15:04, <roberto.premoli@xxxxxxxxxx> wrote:

> Hello,
> i wrote a gambas program to run on a touch screen.
> The desktop GUI has in lower part of display a static button that must be pressed to popup
> the virtual keyboard (1st cliclc popup, second clidk pop down).
>
> in my main gambas program, i have a TextArea where to type my data.
> so i must do the follow:
> 1. click in my program TextArea to focus it
> 2. click to popup the GUI virtual keyboard
> 3. type text in GUI virtual keyoar that fill thextArea
> 4. save text pressing a button on my program
> 5. click to popdown the GUI virtual keyboard
>
> The button in GUI to pop up/down virtual keyboard is always in a fixed position, so I wist to emulate point 2 and 5 using gambas commands.
>
> I can move the cursor of mouse with mouse.move(X,Y), but I did not find the commad that do the click, (lets call it) mouse.force.Clik=left_mouse_button
> so, is it possible to emulate the press of mouse buttons? if yes, how?
>
> Thanks,
> Roberto
>
>
I don't think it is reliably possible with gambas.   (it is possible with
the command xdotool)

There is no need to fake a button press though

just trigger the button press manually..

btnOpenVirtKeyboard.Value = True

or Form1.btnOpenVirtKeyboard_Click()

Follow-Ups:
Re: It is possible to emulate the mouse click?Admin <admin@xxxxxxxxxx>
Re: It is possible to emulate the mouse click?roberto.premoli@xxxxxxxxxx
References:
It is possible to emulate the mouse click?roberto.premoli@xxxxxxxxxx