ahertel / Amazon-Fresh-Whole-Foods-delivery-slot-finder

A Mac tool that finds available delivery slots for Amazon's Whole Foods delivery and Amazon Fresh services
MIT License
1.03k stars 171 forks source link

Zoom window instead of resizing. #30

Open cgull opened 4 years ago

cgull commented 4 years ago

First, thanks! I got the two delivery slots I needed with your script.

I've got a Retina iMac with a 1920x1080 second monitor (non-Retina) to the right. Given my particular configuration, the desktop on the second monitor is perhaps 60% as tall as the built-in display, I have to make windows shorter before moving them across.

When this script gets a slot, it unminimizes the window and resizes it to the desktop. Unfortunately, on my system, that creates a giant, almost unusable window that extends across both monitors to the full height of the Retina display. As I remember it, I clicked through to the confirm-order page, and the Amazon Buy button ended up hidden under my Notifications, and the zoom button was unhelpful since the window has actually been resized-- it just grows the window by a pixel or two to fill the entire screen. I had to resize the window. (But I still did get my slots.)

I'd like to suggest this change. On my system, the window vertically zooms to full height and its width grows a bit. The zoom button returns it to its previous size. And it's simpler code. I'm unclear on the full behavior of zoom, but I suspect it's intelligent enough to grow only to one display on multi-monitor systems.

ahertel commented 4 years ago

@cgull Will look at this shortly but just wanted to say you gave me a hearty laugh at picturing what the resize was doing on your dual monitors. Haha. Thanks for sharing that story :)

cgull commented 4 years ago

Oh yeah, I tested this on a script reduced to only the window actions. I couldn't test it with the real thing. I'm done Amazon shopping for now, soon I will have food for the next 3 weeks...