Can’t make |miniaturized| of window 1 into type specifier. (-1700)

I am get the following error when I try to set miniaturized of a window to false/true for an application whose name I supply as a variable.


set x to "Safari"

tell application x to set miniaturized of the front window to false


ERROR

miniaturized-safari.scpt:40:85: execution error: Safari got an error: Can’t make |miniaturized| of window 1 into type specifier. (-1700)


while I don't get any error when I try the following


tell application "Safari" to set miniaturized of the front window to false

Posted on Apr 9, 2018 6:03 AM

Reply
3 replies

Apr 9, 2018 8:03 AM in response to skashyap7

The terms miniaturizable, and miniaturized are boolean properties defined in the Safari AppleScript dictionary. If your “x” application has no AppleScript support, or if it does, but excludes either property — then you are done.


In the AppleScript Editor, look for your "x" application name in those listed under File menu : Open dictionary… . If there is AppleScript support, look for some property name that alludes to miniaturization.

Apr 9, 2018 10:35 AM in response to skashyap7

Applications either have scripting dictionary support within the application bundle, or they do not. If they do, they will appear in the Script Editor's list of dictionaries. If the application developer has defined a property that permits miniaturization, then you must use that application specific property name, if is different from the one used within Safari. If there isn't one, you script will break.


tell my application x

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can’t make |miniaturized| of window 1 into type specifier. (-1700)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.