<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>Based on a recent post, I have found easy to switch between the two front-most windows,<DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>osascript -e '</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>tell application "TextMate"</FONT></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><FONT class="Apple-style-span" face="Courier">set index of window 2 to 1</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>end tell</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>' &>/dev/null &</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(binded to numeric(0), making it really fast two use it!!, I use the little finger)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>but it doesn't work as desired since, although it exchanges the windows order, it doesn't exchange the active one, leaving the window behind the new front-most one active :(</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Has anyone know some solution?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> -- Juan FC</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>