tell application "Terminal"
get size of front window
Return the same result as this?
get size of front window of application "Terminal"
The former returns the window size, the latter returns the font size.
I’m guessing it’s the same problem – the terminology can’t be resolved because the context of “Terminal” is lost by the time the result from “front window” is returned. If I encapsulate the second example above with ‘using terms from app “Terminal”’ I do indeed get the window size.
I view this as a serious limitation to the language because the code must explicitly state the full specifier of each object in order to reliably query it. I think this means I can’t write a generic method to operate on any window independent of the application to which it belongs.
Am I missing something?
It seems to me that if I have a handle on an object, say a window, I should be able to get its size without having to specify that it’s a Terminal window.