Skip to main content
Inspiring
December 18, 2014
Question

Send Keystroke/MousePress to another windows app?

  • December 18, 2014
  • 1 reply
  • 503 views

Have a hardware h264 encoder with a basic capture - stop capture interface. I'd like my AIR app to be able to press those buttons in order to minimize errors. Is this possible? Didn't have much luck Googling.

This topic has been closed for replies.

1 reply

itlancer
Inspiring
January 1, 2015

You can do that by mouse_event and SetCursor WINAPI functions:

SetCursor function (Windows)

mouse_event function (Windows)

Call it by PowerShell script or write C++ ANE for this.

dmennenohAuthor
Inspiring
January 1, 2015

I actually wrote a PowerShell script that will do what I need but cannot get the script to run from AIR. I can get PowerShell to open, and load the script - but not execute it. Any tips?

itlancer
Inspiring
January 1, 2015

I also spend a lot of time to solve this issue, look here:

Re: Run PowerShell script?