• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Java to Automatically enter Login, Password and Enter key to start web page XM Pplayer

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My quest:
I have an XM/Sirius Internet account and want to record a show that comes on at night when I am asleep.
I can use Task manager to wake my computer and get to the web page that I need and it will also start the program that I use to record (Total Recorder) but what can I use to enter my Login, Password and hit the enter key to start the XM player?
I have only limited experience with Visual basic and no experience with Java but I understand Java is what I Need to accomplish my task. Can anyone help me with my task in a manner that even a novice can understand?

Thanks

John
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

john Huck wrote:My quest:
I have an XM/Sirius Internet account and want to record a show that comes on at night when I am asleep.
I can use Task manager to wake my computer and get to the web page that I need and it will also start the program that I use to record (Total Recorder) but what can I use to enter my Login, Password and hit the enter key to start the XM player?


You can't automate the keyboard and mouse that way in Java. What you would likely need to do is study the login form to see what URL it submits to and what information it requires to successfully login, then make a post request to the same url providing the correct information. It very well could be a multi-step process, like post to one URL and get a secret token or cookie, then post to the login url to with your username, password, the secret token and cookie. And it might not be so easy to get that info from pages directly anymore, since there is so much use of javascript and dynamic page content the actual data required by the form could be well hidden.

Anywho, you will have to dig it all out and mimic the login process. Before you do that you should check the site's terms of service, though, 'cause of they catch you using a bot to login they could boot your account if it isn't allowed.

I have only limited experience with Visual basic and no experience with Java but I understand Java is what I Need to accomplish my task. Can anyone help me with my task in a manner that even a novice can understand?


There is no special reason you need Java for this. If you are more experience in VB, then you might find it better to use VB rather than learning a new language to do this. If you think you will get code you can copy and paste and be up in a day, you are mistaken - it will take you a lot longer than that to learn what you need to do it in Java. On the other hand if you just want to use this as an application to get you started in learning Java, then awesome - having a target to hit is great. I would start here to begin learning the language: Oracle's Java tutorial then mosey on over to Apache HttpClient to get a library to help with the HTTP comms.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Years ago there used to be applications which you could get which would start other applications and click on buttons in those applications and so on. But it didn't take long before people started using those applications, or rather the APIs used by them, to do all kinds of ill-mannered things like downloading malware without the user's consent. So recent versions of Windows were fixed to basically outlaw that.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the site have a "Remember me" or "Keep me logged in" kind of option? I am wondering if you can bypass the login by logging manually and choosing this option. The the recorder application might not need to login.

I can use Task manager to wake my computer and get to the web page that I need and it will also start the program that I use to record (Total Recorder)


Of course this might work if the application uses the same browser you used to login.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic