Yes, this is possible with the Windows API. You need to send a message to this window. First use Spy ++ to get the identifiers of all the buttons that you want to click. Spy ++ is a Visual Studio tool and it shows which messages are sent to the application when these buttons are clicked. Then use the PostMessage () function (Windows API) to send the same message programmatically.
You can also see Winamp (music player for Windows), there is documentation on how to press buttons from an external application. You can do this the same way for other applications, you just need to know the identifiers of all the controls and the names of the windows or their classes.
here is the code for pressing the Winamp pause button:
#define AMP_PAUSE 40046
HWND hwnd = FindWindow("Winamp v1.x", 0);
if(hwnd) SendMessage(hwnd, WM_COMMAND, AMP_PAUSE, 0);
++. #, PInvoke Windows API. , , . FindWindow , . SendMessage PostMessage. : , .
Spy ++ , FindWindow SendMessage. , , , .