[COLOR="#008000"];the function hot key is CTRL+/[/COLOR]
[B]HotKeySet("^/", "StopBot")[/B]
[COLOR="#008000"];loop[/COLOR]
[B]While 1
Sleep(1000)
WEnd
Func StopBot()
If ProcessExists("Honorbuddy.exe") Then
WinActivate ("Honorbuddy")[/B]
[COLOR="#008000"];maximize the window for the purpose of ensuring the start/stop button is always in the same place for the mouse click[/COLOR]
[B]WinSetState ("Honorbuddy", "", @SW_MAXIMIZE )
Sleep(40)[/B]
[COLOR="#008000"];remember mouse postition[/COLOR]
[B]$pos = MouseGetPos()[/B]
[COLOR="#008000"];prevent user inuruption[/COLOR]
[B]BlockInput (1)[/B]
[COLOR="#008000"];click the start stop button[/COLOR]
[B]MouseClick("left", 1835, 1031, 1, 1)[/B]
;just emulates ctrl press to prevent it getting stuck from blocked input
[B]Send("{CTRLDOWN}")
Send("{CTRLUP}")[/B]
[COLOR="#008000"];allow input again[/COLOR]
[B]BlockInput (0)[/B]
[COLOR="#008000"];un-maximize honorbuddy[/COLOR]
[B]WinSetState ( "Honorbuddy", "", @SW_RESTORE) [/B]
[COLOR="#008000"];return mouse to original position[/COLOR]
[B]MouseMove($pos[0], $pos[1], 0)[/B]
[COLOR="#008000"];restore wow window[/COLOR]
[B]WinActivate ("World of Warcraft")
EndIf
EndFunc[/B]