The problem of mouse automation and interaction with Flash applications

I wrote a C # tool that mimics a user interacting with a Windows 7 environment. It works, unless you interact with several online flash applications. Mouse movements and clicks are generated, but Flash applications do not receive them. I think I need to generate mouse events at the lower level, but I cannot confirm this.

I tried several different mechanisms:

[DllImport("user32.dll")]
static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo);

[DllImport("user32.dll", SetLastError = true)]
private static extern uint SendInput(uint nInputs, INPUT[] pInputs, int cbSize);

Has anyone encountered this problem? Any ideas on how I can generate mouse events that will be logged in a Flash application?

Update: Looks like flash applications get a mouse click. Their click animation is displayed when a C # application is sent with a mouse click. However, nothing happens even if the Flash application's mouse click animation is displayed.

+3
source share
4 answers

Different flash applications respond to different mouse_events. Have you tried sending mousedown, mouseup, etc.? Also, sometimes you need to use mousemove first. I saw some flash applications in which some buttons work mousedown and others with the mouse. Also consider disabling the keyboard and mouse immediately before dispatching events and re-enabling after.

+1

. , , , SendInput, . ( tweening), , - .

, , - (.. ), , Application.DoEen

+1

FlexMonkey Flex/AIR UI? . http://www.gorillalogic.com/flexmonkey

0

Also try hiding the mouse cursor and checking the mouse pointer wires (x and Y) in the text box by trying the simple Event.ENTER_FRAME. I think the problem is with the browser, and not with the actual flash application. The browser that you use to display flash memory, I think it should have some properties that allow you to write mouse data using Flash.

0
source

Source: https://habr.com/ru/post/1762074/


All Articles