I’m having to use System Events because the application “BBC iPlayer Downloads” is not natively scriptable - it doesn’t have a minimize property.
This code:
tell application “BBC iPlayer Downloads”
set minimized of window 1 to true
end tell
produces this error:
error "BBC iPlayer Downloads got an error: Can’t set minimized of window 1 to true." number -10006 from minimized of window 1
Here is the code I ran to get the window properties:
tell application “System Events”
tell process “BBC iPlayer Downloads”
get properties
tell window 1
get properties
end tell
end tell
end tell
which produces:
{minimum value:*missing value*, orientation:*missing value*, position:{208, 66}, *class*:*window*, accessibility description:*missing value*, role description:"standard window", focused:*false*, title:"BBC iPlayer Downloads", size:{1024, 768}, help:*missing value*, entire contents:{}, enabled:*missing value*, maximum value:*missing value*, role:"AXWindow", value:*missing value*, subrole:"AXStandardWindow", selected:*missing value*, name:"BBC iPlayer Downloads", description:"standard window"}
Here is the code I ran to get the process properties:
tell application “System Events”
tell process “BBC iPlayer Downloads”
get properties
end tell
end tell
which produces:
{has scripting terminology:*false*, bundle identifier:"uk.co.bbc.iplayer.downloads", *file*:*alias* "Macintosh HD:Applications:BBC iPlayer Downloads.app:" **of** *application* "System Events", creator type:"????", subrole:*missing value*, entire contents:{}, selected:*missing value*, application file:*alias* "Macintosh HD:Applications:BBC iPlayer Downloads.app:" **of** *application* "System Events", orientation:*missing value*, role:"AXApplication", accepts high level events:*true*, file type:"APPL", value:*missing value*, position:*missing value*, id:3789725, displayed name:"BBC iPlayer Downloads", name:"BBC iPlayer Downloads", *class*:*application process*, background only:*false*, frontmost:*false*, size:*missing value*, visible:*true*, Classic:*false*, role description:"application", maximum value:*missing value*, architecture:"x86_64", partition space used:0, short name:"BBC iPlayer Downloads", focused:*missing value*, minimum value:*missing value*, help:*missing value*, title:"BBC iPlayer Downloads", accepts remote events:*false*, total partition size:0, description:"application", accessibility description:*missing value*, enabled:*missing value*, unix id:42972}
Any suggestions?