Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

harrym

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

  • one year ago
  • one year ago

  • This Question is Open
  1. harrym
    Best Response
    You've already chosen the best response.
    Medals 0

    Without physically changing tabs or changing applications would be a better way to rephrase the last sentence.

    • one year ago
  2. bdean20
    Best Response
    You've already chosen the best response.
    Medals 0

    If you're only interested in buttons on web sites, you would be better off adding some sort of interface to your browser (such as an add-on/extension) that actually interacts with the web site for you. Those are written in JavaScript, and you would write it such that your python code is able to send through a message that triggers the click. 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).

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.