-1

I want to write a program in C# that can detect mouse button interactions with ui elements in other apps and get information regarding the ui element that was interacted with and its parents, specifically an identifier for those elements that is the same every time the program is run.

For example if the user clicks on a button in another app using the mouse, my code should detect button click and get a unique identifier for that button.

AliC
  • 1

1 Answers1

-1

You can use MouseKeyHook Nuget package. For Example, you can detect double click like this

 Hook.GlobalEvents().MouseDoubleClick += async (sender, e) =>
 {
      Console.WriteLine($"Mouse double click = {e.Button}");
 };
nahid
  • 39
  • 3