Resize window, actual dimensions based on specific screen

I want to make a macro for resizing windows. For instance, Finder windows, when first created, are usually smaller than I like. But the specific dimensions, in pixels, depends on whether I’m on my laptop or working on an external monitor. How do I query the type of monitor (or possibly it’s size) and then use that to choose new window dimensions?

See the Functions section of the web site, in particular the SCREEN function (or SCREENVISIBLE probably).

The built-in capabilities work wonderfully, but situations like this can also be handled with AppleScript. I've faced the same issue with window sizes depending upon whether I'm using the laptop screen or an external monitor. The only reason I still use an AppleScript solution over a more native KM solution is that my macro predates the KM functionality and I've never redesigned the macro.

There have already been numerous Macros built/published that do this. Here is one you can look at:

Window mover/resizer macro package

You may also want to review the topics posted with the "windows" tag.