Hello,

I have been playing around with AHK scripts and i am trying to find a way to set the variables in my script.

Basically i play two copies of wow windowed and i want to be able to press "C" and whichever window is active set that to variable "%chrMAIN%" and the other id is "%chrAlt%"

In the end i want to be able to play windowed and alt tab between them and with a press of "C" change whichever one i am on to my main.



I know how to make a toggle button but i would rather it detect which window i am currently looking at and set that variable to the main


or can i do this without pressing c? like it always checks what window i am looking at??