use application "System Events"
set _P to a reference to (every process whose class of windows contains window)
set _W to a reference to (windows of _P whose value of attribute "AXMinimized" is false)
set clos_list to {}
repeat with clo in (the windows of _P whose value of attribute "AXMinimized" is false)
copy title of clo to end of clos_list
end repeat
set value of attribute "AXMinimized" of _W to true
delay 5
set _W to a reference to (windows of _P whose value of attribute "AXMinimized" is true)
repeat with clo in _W
try
if title of clo is in clos_list then set value of attribute "AXMinimized" of clo to false
end try
end repeat
clos_list
我覺得我需要一個類似這樣的東西(