How to get a NN to move a Mouse

Hi Everyone!
I was running through some ideas for a school project and wanted to create a bot for some popular games, the performance would really matter but the concept seems pretty cool. It is a PC game and we are looking at Overwatch or Valorant (other suggestions accepted;)). We just wanted to what would be the best way to record and play through (the Neural Network) the mouse movements. We plan to use RL (like the OpenAI team did for Dota II) but getting a computer to move a mouse would be an interesting task.
The question is: How do we record and get a AI to move a mouse in the most efficient way possible?