Skip to content

Commit

Permalink
Alt tab al pulsar botones.
Browse files Browse the repository at this point in the history
Signed-off-by: elModo7 <[email protected]>
  • Loading branch information
elModo7 committed Jul 25, 2020
1 parent 225f90d commit a367072
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Nova Macros Client Offline.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ PulsarBoton(BotonAPulsar)
{
if(MoverRatonAlPulsarBoton)
MouseMove, %Pantalla_Mitad_X%, %Pantalla_Mitad_Y%, 0
AltTab()
if(EnCarpeta)
{
if(BotonAPulsar != 15)
Expand Down Expand Up @@ -1370,3 +1371,39 @@ OnMsgBox() {
ControlSetText Button4, % MsgBoxBtn4
}
}

AltTab(){
; Alt tab replacement, faster, less distracting
list := ""
WinGet, id, list
Loop, %id%
{
this_ID := id%A_Index%
IfWinActive, ahk_id %this_ID%
continue
WinGetTitle, title, ahk_id %this_ID%
If (title = "")
continue
If (!IsWindow(WinExist("ahk_id" . this_ID)))
continue
WinActivate, ahk_id %this_ID%, ,2
break
}
}

; Check whether the target window is activation target
IsWindow(hWnd){
WinGet, dwStyle, Style, ahk_id %hWnd%
if ((dwStyle&0x08000000) || !(dwStyle&0x10000000)) {
return false
}
WinGet, dwExStyle, ExStyle, ahk_id %hWnd%
if (dwExStyle & 0x00000080) {
return false
}
WinGetClass, szClass, ahk_id %hWnd%
if (szClass = "TApplication") {
return false
}
return true
}

0 comments on commit a367072

Please sign in to comment.