How Do I Resize window to 40%

This is easily done, and there have been many examples posted in this forum.
Take a look at this Thread:
Newbie question: resize a window to central 1/3 of the screen

If that does not answer your question, here are many more topics on that subject:

https://www.google.com/search?q=site%3Aforum.keyboardmaestro.com%20Resize%20Window

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@catsvanbags, welcome to Keyboard Maestro (KM) and its Forum.
KM is one of the best Mac automation tools available, its Forum is one of the best and friendliest forums on the Internet. Whenever you reach a tough stumbling block trying to use KM, please feel free to post your question/problem here for help.

You will also find this helpful:
Tip: How Do I Get The Best Answer in the Shortest Time?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Getting Started with Keyboard Maestro

For more help, see Getting Started with Keyboard Maestro and the Forum .