Iterate Window instead of Mass Operation

I'm trying to modify this code to work iteratively:
on run {input, parameters}
tell application id "com.apple.systemevents" to set the value of
attribute "AXMinimized" of every window of every process
to false
end run


Something along the lines of :
on run {input, parameters}
foreach windows of every process
tell application id "com.apple.systemevents" to set the value of
attribute "AXMinimized"
to false
end run


Is this possible?

Answered by Jujitsu3711 in 763456022

Thank you for your help. For anyone interested, here is code that unminimized windows iteratively.

on run {input, parameters} set windowNames to {} tell application "System Events" repeat with p in every process repeat with w in every window of p if value of attribute "AXMinimized" of w is true then set value of attribute "AXMinimized" of w to false end if end repeat end repeat end tell windowNames end run

I'm trying to modify this code to work iteratively:

Something like this:

set windowNames to {}
tell application "System Events"
	repeat with p in every process
		repeat with w in every window of p
			set n to name of w
			set windowNames to windowNames & n
		end repeat
	end repeat
end tell
windowNames

This just reads the window names but you could adapt it to other things.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Thank you for your help. For anyone interested, here is code that unminimized windows iteratively.

on run {input, parameters} set windowNames to {} tell application "System Events" repeat with p in every process repeat with w in every window of p if value of attribute "AXMinimized" of w is true then set value of attribute "AXMinimized" of w to false end if end repeat end repeat end tell windowNames end run

Iterate Window instead of Mass Operation
 
 
Q