> For the complete documentation index, see [llms.txt](https://an-thanhphann2004.gitbook.io/csgo112/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://an-thanhphann2004.gitbook.io/csgo112/features/auto-strafe.md).

# Auto strafe

A CSGO macro made in AHK

This feature strafes for you. This auto strafe is to the best of my ability. Up till the final release I still can't get it right. Heavy fixes are recommended before using.

```
XButton2::
while getkeystate("XButton2","P")
{
strafe(true)
strafe(false)
}
return
```

When mouse 5 is being held, the script will attempt to perform a strafe. Since i rarely uses mouse 5 I didn't add a toggle feature to this one. Feel free to paste the toggle part from previous features to this one.

**Change "XButton2" to your desired toggle hotkey ("X" with "X" representing the key of your choice. For example if you want the toggle key to be the "F" key you replace "XButton2" with "f").**
