title: Telling Pyautogui to press a key for X seconds
body: <p>I just started with python that's why I don't really know how to make certain things :)</p>
  <p>I wanted to code that my character in a game moves from one spot to another other but the bot will do it forever because I set it in a loop (I want him to do it kind of all-day xd) it could be that it's the fault of the while loop but it didn't change anything when I tried.</p>
  <p>Now I come to my question. I want him to move for a certain amount of like 2 seconds and then he should do the next thing. Is there a possibility to tell him that he should move for the amount of time I tell him or not? If yes, I would appreciate an answer :)</p>
  <p>Have a nice day</p>
  <p><a href="https://i.stack.imgur.com/FbAgz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FbAgz.png" alt="that's my code so far. I stopped because it didn't work so yeah" /></a></p>