For one of my projects, I had to manually open the browser and resize it to the
9:16 aspect ratio. Doing this task manually and hitting those
9:16 aspect ratio numbers was time-consuming and prone to errors. Trust me it was also boring to resize the window. Another challenge was to position the browser every time perfectly at the same position on the screen.
I thought to automate the steps by automatically opening the Chrome browser from the command line and resize it by passing arguments to the startup command line
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome". Make sure you put command inn double quotes as the path is having spaces.
--window-position=100,100as an argument. This will position the Chrome browser at
100 pixelsfrom the left and
100 pixelsfrom the top
sh automation.shand wait for the magic to happen
You might also want to get rid of notification “Google API Keys are missing…“. To disable notification add below environment variables just above the command to launch Chrome