https://stackoverflow.com/questions/7681418/un-minimizing-an-app-with-applescript
try
tell app "System Events" to tell process "Dock"
click (last UI element of list 1 where role description is "minimized window dock item")
end tell
end try