Skip to main content
added 44 characters in body; edited title
Source Link
HippoMan
  • 410
  • 3
  • 11

BigSur - Querying the dimensionsbounds of any visible window?

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensionsdimensionsbounds of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensionsdimensionsbounds, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensionsdimensionsbounds I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensionsdimensionsbounds of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its window's bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

BigSur - Querying the dimensions of any visible window?

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensions I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensions of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its window's bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

BigSur - Querying the bounds of any visible window?

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensionsbounds of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensionsbounds, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensionsbounds I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensionsbounds of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its window's bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

added 9 characters in body
Source Link
HippoMan
  • 410
  • 3
  • 11

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensions I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensions of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its window's bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensions I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensions of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensions I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensions of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its window's bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

Added much more clarification in my initial query
Source Link
HippoMan
  • 410
  • 3
  • 11

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensions I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensions of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

NOTE - More clarification of this question has been added. See "UPDATE", below.

Is there a way in BigSur (version 11.6) to query the dimensions of any window that is showing on the screen?

When running under X Windows in linux, I can run the xwininfo command and click on any open window, and the window's attributes, including its dimensions, will be output. Is there a corresponding command for MacOS? Note that I am not running X Windows on my Mac.

Thank you very much in advance.

UPDATE: I mentioned the following below in the comments, but I want to add it here also now, for clarity ...

There are cases where I don't know the application name of the window whose dimensions I want to query. All I see is a window, and sometimes, there is no indication on the window itself as to what application the window belongs to. If I do not know the application name of a given window, how can I query the dimensions of that particular window?

Also, there is another issue: there are some windows which are not created by a normal *.app type appliction. For example, when I am using the mpv program to view a video, that application is not an *.app; rather, it is simply an executable which has been installed by Homebrew. Because of this, there is no way to query its bounds using the following Applescript command ...

tell application "mpv"
    set position to bounds of window 1
end tell

This Applescript command fails with windows created with non-*.app type programs such as mpv.

I am looking for a more general way to query window dimensions, even if I don't know the name of the application controlling the window, and even if the application is not a standard *.app application.

Is there a way to do this?

Source Link
HippoMan
  • 410
  • 3
  • 11
Loading