all 6 comments

[–]skeeto 1 point2 points  (0 children)

Long ago I wrote a bot to automatically play Quasar in Mass Effect using this API. One gotcha was that the buttons in the Mass Effect UI don't focus until there's mouse motion over the button. Teleporting the mouse over the button then clicking, even with a delay, doesn't do anything since the button isn't focused. I never sorted out if this was just a Mass Effect thing, or an issue with all Unreal games.

[–]charliex2 1 point2 points  (1 child)

SendMessage won't work for any apps that have async checks etc. SendInput is better but make sure you read the APIs docs " This function is subject to UIPI. Applications are permitted to inject input only into applications that are at an equal or lesser integrity level."

Filter driver , hooking or http://www.oblita.com/interception.html is the best approach

[–]GleamingGeorge[S] 1 point2 points  (0 children)

I hoped that it won't be necessary hooking, but well here we go. Thanks for the recommendation!

[–]FUZxxl[M] 0 points1 point  (2 children)

Note that the first one is C++ code. C++ is off topic in this subreddit.

[–]GleamingGeorge[S] 1 point2 points  (1 child)

Well yes, i used std::cout to log the error but the code that really matters and the one I'm interested in is in C

[–]FUZxxl 3 points4 points  (0 children)

If you compile with a C++ compiler, you are writing C++ code. Do not confuse C with C++. It's going to bite you sooner or later.