sry for doublepost.
But i figured out, that you have to set the coordinates for "BG-Leave Button" as well.
Just use the AutoIt Window Info like you used it for the "Enter-BG Button".
And then tipe in the coordinates in
Code:$coord = PixelSearch(350, 600, 1000, 690, 0x670000, 10) ;searches for color of leave battleground button within 10 variations