Is there a way to determine whether the active window (not of my process, but a different application) is resizable?
Edit: I would prefer to do this without applescript as it then depends on the application being scriptable.
Is there a way to determine whether the active window (not of my process, but a different application) is resizable?
Edit: I would prefer to do this without applescript as it then depends on the application being scriptable.
Yes, you can check if the "frontmost window" of the target application is resizable! You can perform the scripting request via applescript, scripting bridge or a third party framework!
However, in any case, it's needed that the target application is scriptable and you can access to the "resizable" property (of the "frontmost window" object) via a scripting request!
Depends on how you're getting access to the window. There's a property in AppleScript on Window objects, resizable, that indicates this.
Use Accessibility. Once you find the window you want to examine, test whether it has the kAXGrowAreaAttribute
attribute (the value for which would be the grow area itself, a.k.a. the “size box” or [the Windows term] “resize handle”). A window that has one is resizable; a window that doesn't have one is not resizable.
The user will need to have access for assistive devices turned on, but making that happen is easier than scripting unscriptable applications.