I am working on a project written in Python that should perform some actions in an opened application window. For example I run application window with 3 buttons at 3 different positions. I write a script using auto-gui lib for python 3 and set x, y coordinates to click on 3 button positions. But my problem is: If I minimize this window, clicker clicks at the given position within another currently open window. 
My main question: is there a way (with help of a lib or by any other means) to trigger or bind this script to work only with this opened (or specified) application. And if I minimize this window, clicker continues to work in this minimized window, not in the currently active one. Please suggest.
You should have a look at win32gui module, more specifically to SetActiveWindows, SetForegroundWindow, SetActiveWindows also EnumWindows to find your application.
With these you can detect a certain application by it's title using EnumWindows you can then maximize it and set it as active so it will be fullscreen and the first one you see on the monitor. This way you can now use the (x,y) coordinates for clicks because the windows will always be maximized therefore the buttons in the same position everytime.
python: windows GUI automation working with a specific window regardless of its state