Code Monkey home page Code Monkey logo

Comments (6)

Roemer avatar Roemer commented on May 19, 2024

There are multiple aspects here:

  1. There is a boolean to define if the mouse should move slowly or instantly
  2. If you use the mouse clicks the mouse always need to be at the position that should be clicked. There is no way around.
  3. Maybe it us better if you use Invoke from the InvokePattern.

from flaui.

Radzhab avatar Radzhab commented on May 19, 2024

@Roemer , with winapi i can click on control without mouse. I think this lib allow make me win api calls

from flaui.

Roemer avatar Roemer commented on May 19, 2024

You can use WinAPI with SendMessage to fake clicks but then you could miss some events like mouse enter and such. I might think to add that as well but in general using patterns is better.

from flaui.

Radzhab avatar Radzhab commented on May 19, 2024

@Roemer why you think that i miss mouse enter event?

from flaui.

Roemer avatar Roemer commented on May 19, 2024

Because this one is only fired when the mouse effectively moves over an element.

from flaui.

Roemer avatar Roemer commented on May 19, 2024

I did some more research (again) and the SendMessage method is very unreliable (see https://blogs.msdn.microsoft.com/oldnewthing/20050530-11/?p=35513). And the SendInput method (which is the best to simulate the mouse) does not allow to "send" to other windows than the foreground window.
If you need to click a button without moving the mouse, use the invoke method from the invoke pattern. If the element you want to click does not support the invoke pattern, use your own SendMessage for this and hope that it works. Since it's unreliable, I will not add this to the FlaUI base framework. Feel free to add more comments if you still have questions.

from flaui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.