Calling mouse_event from a service
Posted: Sun Aug 30, 2009 9:08 pm
@stottle
Sadly, EG's mouse emulation doesn't work right for UAC prompts. Even though EG can work in the background, while an UAC prompt is shown, EG doesn't seem to be able to move the mouse or do any mouse clicks on this "UAC desktop".
I use some program (InputDirector), that also has to emulate mouse movements and clicks, and this one is able to emulate the mouse while an UAC prompt is up. This program runs as a service, so I came to the assumption, that a service running under the system account might be able to do this.
So, could you please try (just as a proof of concept), if your service is able to emulate a mouse click with mouse_event(0x0002, 0, 0, 0, 0), followed by a mouse_event(0x0004, 0, 0, 0, 0) for the release of the button, while an UAC prompt is shown? I guess, you can simple start this on any reception of an IR sequence and move the mouse manually onto a button of the UAC prompt, just to see if it would react.
I don't want to start writing a service, just to find out, that I follow the wrong assumption.
Sadly, EG's mouse emulation doesn't work right for UAC prompts. Even though EG can work in the background, while an UAC prompt is shown, EG doesn't seem to be able to move the mouse or do any mouse clicks on this "UAC desktop".
I use some program (InputDirector), that also has to emulate mouse movements and clicks, and this one is able to emulate the mouse while an UAC prompt is up. This program runs as a service, so I came to the assumption, that a service running under the system account might be able to do this.
So, could you please try (just as a proof of concept), if your service is able to emulate a mouse click with mouse_event(0x0002, 0, 0, 0, 0), followed by a mouse_event(0x0004, 0, 0, 0, 0) for the release of the button, while an UAC prompt is shown? I guess, you can simple start this on any reception of an IR sequence and move the mouse manually onto a button of the UAC prompt, just to see if it would react.
I don't want to start writing a service, just to find out, that I follow the wrong assumption.