@@ -753,6 +753,7 @@ PulsarBoton(BotonAPulsar)
753753{
754754 if (MoverRatonAlPulsarBoton)
755755 MouseMove , %Pantalla_Mitad_X%, %Pantalla_Mitad_Y%, 0
756+ AltTab()
756757 if (EnCarpeta)
757758 {
758759 if (BotonAPulsar ! = 15 )
@@ -1370,3 +1371,39 @@ OnMsgBox() {
13701371 ControlSetText Button4, % MsgBoxBtn4
13711372 }
13721373}
1374+
1375+ AltTab (){
1376+ ; Alt tab replacement, faster, less distracting
1377+ list := ""
1378+ WinGet , id , list
1379+ Loop , %id %
1380+ {
1381+ this_ID := id %A_Index %
1382+ IfWinActive , ahk_id %this_ID%
1383+ continue
1384+ WinGetTitle , title, ahk_id %this_ID%
1385+ If (title = "" )
1386+ continue
1387+ If (! IsWindow(WinExist (" ahk_id" . this_ID)))
1388+ continue
1389+ WinActivate , ahk_id %this_ID%, ,2
1390+ break
1391+ }
1392+ }
1393+
1394+ ; Check whether the target window is activation target
1395+ IsWindow (hWnd ){
1396+ WinGet , dwStyle, Style , ahk_id %hWnd%
1397+ if ((dwStyle& 0x08000000 ) || ! (dwStyle& 0x10000000 )) {
1398+ return false
1399+ }
1400+ WinGet , dwExStyle, ExStyle , ahk_id %hWnd%
1401+ if (dwExStyle & 0x00000080 ) {
1402+ return false
1403+ }
1404+ WinGetClass , szClass, ahk_id %hWnd%
1405+ if (szClass = " TApplication" ) {
1406+ return false
1407+ }
1408+ return true
1409+ }
0 commit comments