Post by joedf » 11 Oct 2021, 17:03
J'ai écris ce script, mais je ne pense pas que
alt+z fonctionne correctement,
alt+z fonctionne bien.
Le code pour alt+a me mélange un peu trop la tête...
Code: Select all
!z:: WinActivate, % "ahk_id " w:=GetPrevious()
!a:: WinActivate, % "ahk_id " w:=GetNext()
GetWindowFamily() {
WinList:=[]
WinGet, activeExe, ProcessName , A
WinGet, windows, List, ahk_exe %activeExe%
Loop %windows%
{
id := windows%A_Index%
WinList.Push(id)
}
return WinList
}
GetPrevious() {
w := GetWindowFamily()
return w.Pop()
}
GetNext() {
static last
w := GetWindowFamily()
if (w.Length() > 2) {
next := w[2]
if (last == w[1])
{
next := w[3]
}
return last := next
}
return last := w.Pop()
}
J'ai écris ce script, mais je ne pense pas que [kbd]alt+z[/kbd] fonctionne correctement, [kbd]alt+z[/kbd] fonctionne bien.
Le code pour alt+a me mélange un peu trop la tête... :crazy:
[code]!z:: WinActivate, % "ahk_id " w:=GetPrevious()
!a:: WinActivate, % "ahk_id " w:=GetNext()
GetWindowFamily() {
WinList:=[]
WinGet, activeExe, ProcessName , A
WinGet, windows, List, ahk_exe %activeExe%
Loop %windows%
{
id := windows%A_Index%
WinList.Push(id)
}
return WinList
}
GetPrevious() {
w := GetWindowFamily()
return w.Pop()
}
GetNext() {
static last
w := GetWindowFamily()
if (w.Length() > 2) {
next := w[2]
if (last == w[1])
{
next := w[3]
}
return last := next
}
return last := w.Pop()
}
[/code]