Question on User Input from a differenct perspective RRS feed

  • Question

  • So I have a question about user input and how to save previous input.

    I wanted to know how to save the commands/processes called by pressing the mouse button or the keyboard key.

    Instead of the mouse's x,y or keyboard's a,b keys. What I want to do is to re do the exact process called by that input

    given from the user. Is this possible?

    An example of what I am trying to do:

    You open an application with a mouse click.

    Program records the process done, not the click but the process called to open the app, by your mouse click.

    You close that same program.

    You open a window to block that application from being clickable by your mouse.

    You use hotkey or something to repeat the recorded process.

    The same program opens back up using that stored process.


    In essence I wanted to make it possible to map hotkeys or other input types to the processes that can be called

    without explicitly relying on mouse and keyboard but rather the functions that they called.

    I wanted to achieve a way to create a data structure which maps any input to doing any possible process that a computer can

    do with a mouse and keyboard without a mouse or keyboard. It sounds odd but an example would be navigating and using an application using your voice.

    I have considered autohotkey and other alternatives which may seem to work but don't work at the level I want them to.

    Please do give me suggestions and answers.

    Please help,

              Muhammad Salman.

    P.S if there is a way to get all clickable events on current screen or all actions possible from an application and creating links to them then please do tell me how to do so. Thanks again

    Sunday, January 5, 2020 4:32 AM

All replies

  • Hi MuhammadHuzaifaSalman,

    Do you konw SetWinEventHook?

    You can set an event hook function for a range of events, such as detect a window opened or closed.

    Refer: How can I get notified when some other window is destroyed?

    I haven't thoroughly studied this winapi, but I think it can do a lot of things you need.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, January 6, 2020 8:43 AM