If I add a general pause hotkey like v::Pause the code will either just not do anything at all (doesn't error just does nothing) or it will work like normal but the pause won't work. I'm pretty new to this so it's probably something really stupid I'm not noticing. Btw I know I used ifwinactive like 4 too many times but I really just don't want the script to hit f keys in other windows if I tab over in the middle of a sleep or something. Works flawlessly other than pausing.
#IfWinActive, ahk_class "D3 Main Window Class" CoordMode, Pixel loop { if WinActive("ahk_class D3 Main Window Class") { if (GetKeyState("XButton1", "P")) { sleep 10000 } PixelGetColor, color, 466, 715 PixelGetColor, color2, 606, 715 if (color=0x9C6900) { if (GetKeyState("XButton1", "P")) { sleep 10000 } else { if WinActive("ahk_class D3 Main Window Class") { sleep 180 if WinActive("ahk_class D3 Main Window Class") { send {f11} } } } } else if (color2=0x101018) { if (GetKeyState("XButton1", "P")) { sleep 10000 } else { if WinActive("ahk_class D3 Main Window Class") { sleep 180 if WinActive("ahk_class D3 Main Window Class") { send {f10} } } } } else { sleep 200 } } }