title: How do I put a toggle on this AHK script?
body: <p>I'm fairly new to AHK and I was wondering how to put a toggle on this script so I can pause it immediately with XButton1 but also reactivate it at the same point in the loop if that is possible. I've tried looking for solutions but none of them suite my case here especially with trying to pause a loop.</p>
  <pre><code>XButton1::
  SendInput {LButton down}
  Loop, 27
  {
      SendInput {w down}{a down}
      sleep 17500
      SendInput {w up}{a up}
      mouseMove, 52, 0, 20, R
      SendInput {w down}{d down}
      sleep 17500
      SendInput {w up}{d up}
      mouseMove, -52, 0, 20, R
  }
  return
  </code></pre>