Is it possible to bridge a button from an application to a different application? This is hard to ask due to my lack of terminology but here is the example scenario. Lets say you have a play button on a website like Pandora.com and you want to take that play button and add it to your python program so that you can use your python program and be working in that but then click the play button in your program and it will press the play button on Pandora.com without physically moving your mouse. What is this called and how would you even approach this in python? Thank you
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
Without physically changing tabs or changing applications would be a better way to rephrase the last sentence.
The other moderately simple option is that your python program produces input to simulate user action, which means activating the correct window, then placing the mouse over the correct button and clicking it, all using python. You'd also want to give focus back to the other application and put the mouse back where it was. This could maybe be done fast enough to be unnoticeable, but if you're doing a lot like this, you're going to notice it. Note: For anything created in Adobe Flash, you're probably going to need to do it this way or not at all.
For desktop application, there is another option, which requires a bit of "hacking" - unless the application is open source. What you'd have to do is find the event listener for your button in memory and send the signal that the button has been clicked to that listener (by changing the memory). This isn't really something you can do in python without first writing it in C anyway (python modules can be written in C).