Closed ghost closed 3 years ago
Hi @intothefantasy, it sure does, you could for instance guibot.click(guibot.mouse_location)
or guibot.dc_backend.mouse_click()
.
Hi @intothefantasy, it sure does, you could for instance
guibot.click(guibot.mouse_location)
orguibot.dc_backend.mouse_click()
.
hi there, i tried guibot.click() looks like still using mouse cursor but as for the other one dc_backend.mouse_click() i dont have much information on how to use it, can i know how to use it to click on specific location such as x or y? or any documentation for it?
Let me see then if I really understand what you mean by not using a cursor. The way I understood your question, you wanted to click on a location without moving the cursor, both methods above could perform a click at the current location of the cursor. However now you ask about ways to click on a specific location (x, y). So may I ask how do you plan to have the mouse hover this location? You want to move the mouse by yourself and then use Guibot just to click or something else?
Let me see then if I really understand what you mean by not using a cursor. The way I understood your question, you wanted to click on a location without moving the cursor, both methods above could perform a click at the current location of the cursor. However now you ask about ways to click on a specific location (x, y). So may I ask how do you plan to have the mouse hover this location? You want to move the mouse by yourself and then use Guibot just to click or something else?
using guibot to auto everything from moving cursor and clicking without moving the mouse cursor. I wanted to make a script from python to automate something while using the computer at the same time. Normally i look at pyautogui but is using mouse cursor while automate which hinders my activity. If you are familiar with autoit or AHK, they have something call ControlClick function which can replicate this but i prefer to use python in this case.
this is because i tried AHK's ImageSearch function and is not working well cause it need to focus the application everytime which is also a problem for me since i am using the computer at the same time.
Let me see then if I really understand what you mean by not using a cursor. The way I understood your question, you wanted to click on a location without moving the cursor, both methods above could perform a click at the current location of the cursor. However now you ask about ways to click on a specific location (x, y). So may I ask how do you plan to have the mouse hover this location? You want to move the mouse by yourself and then use Guibot just to click or something else?
using guibot to auto everything from moving cursor and clicking without moving the mouse cursor. I wanted to make a script from python to automate something while using the computer at the same time. Normally i look at pyautogui but is using mouse cursor while automate which hinders my activity. If you are familiar with autoit or AHK, they have something call ControlClick function which can replicate this but i prefer to use python in this case.
I see. In the case of Guibot, all desktop controllers we use (among the PyAutoGUI, AutoPy, and VNC-based options) are agnostic to the GUI control structure and treat the screen as an independent set of pixels. This means that there aren't any ways to talk directly to certain windows and their controls which are all OS-specific. We had plans to add pywinauto controller that might do something similar but so far the idea hasn't been fully supported by the team.
If I was working on the screen at the same time and perhaps manage to avoid some interference with Guibot running at the same time, I would do something like:
GlobalConfig.smooth_mouse_drag = False
current_location = guibot.mouse_location
guibot.click(<my-target-location>)
guibot.hover(current_location)
and hope that this happens fast enough (notice we want drag the mouse cursor but will instantaneously move to the location) to return the mouse where it was why I was doing my own activities.
so eventually there is no way guibot can move the mouse without moving the cursor then?
so eventually there is no way guibot can move the mouse without moving the cursor then?
The only difference that the above example can provide is in the way it moves yes. When it comes to direct GUI controls access, there are only plans for some backends to introduce later on that first need greater support and push from people needing them.
ok thanks for helping and answering my questions, i will explore guibot for other options in terms of image search and see how it does.
from the title, need to know if guibot able to do this? moving mouse and click without moving the mouse cursor.