Code: Select all
hidden := []
F2:: {
hwnd := WinExist('A')
hidden.Push(hwnd)
WinHide(hwnd)
}
F3:: {
; MsgBox (hidden.Length) ; This detect the length correctly
loop(hidden){
WinShow(hidden[A_Index])
WinActivate(hidden[A_Index])
}
}
Code: Select all
hidden := []
F2:: {
hwnd := WinExist('A')
hidden.Push(hwnd)
WinHide(hwnd)
}
F3:: {
; MsgBox (hidden.Length) ; This detect the length correctly
loop(hidden){
WinShow(hidden[A_Index])
WinActivate(hidden[A_Index])
}
}
Explained: Length propertyCount:
Type: Integer
If omitted, the loop continues indefinitely until a Break or Return is encountered. Otherwise, specify how many times (iterations) to perform the loop. However, an explicit blank value or number less than 1 causes the loop to be skipped entirely.
Code: Select all
#Requires AutoHotkey v2.0
hidden := []
F2:: {
Try {
hidden.Push(WinExist('A'))
WinHide()
}
}
F3:: {
DetectHiddenWindows True
While hidden.Length
If WinExist(hidden.RemoveAt(1))
WinShow(), WinActivate()
}
Code: Select all
#Requires AutoHotkey v2.0
hidden := []
F2:: {
If hWnd := WinActive('A')
hidden.Push(hWnd), WinHide()
}
F3:: {
DetectHiddenWindows True
While hidden.Length
If WinExist(hidden.RemoveAt(1))
WinShow(), WinActivate()
}