If I run:
tell application "Maps"
set miniaturized of windows to false
end tell
...this works fine
Yet, when I run:
set applicationName to "Maps"
tell application applicationName
set miniaturized of windows to false
end tell
...I get:
Maps got an error: Can’t make |miniaturized| of every window into type reference.
I also tried:
tell application (applicationName as string)
...
end tell
...but I get the same error.
I'm new to Apple Script and not quite understanding the nuances between the two.