0

I have been using a seven year old box to listen to a web radio station. Hey I have the box it actually has no speakers, it just makes me two cents per hour, pays my electricity bill monthly. Here is my issue, windows xp no longer safe and secure, Windows 7 shaky on this box as of its age. The web radio and pages I use to get the payments work within firefox using ubuntu 14 LTS, However after two days it gets memory clogged. So I am looking for a way to automate the following.

Upon startup launch firefox goto a certain web page.
click the login link
click the ok link
click the music link
click the webradio link
then every night at 2 am or something reboot box.

I can figure out only two of the things in the above list to do easily with bash scripting or terminal scripting and scheduling of tasks. but how do i simulate mouse movements and clicking. Also moving much forward in time if I upgrade my other main computer to linux there is a much more involved automated task I perform with swagbucks. Looking for a linux alternative to winautomation www.winautomation.com

Thank you mike I wqill look at the imacro for firefox it should work if it will launch at firefox startup.

However I have tried using imacros for my bigger job flow of automating swagbucks for an all day run while i am at work. That work flow is as follows.

  1. open swagbucks page if not logged in log in.
  2. look for and click on engage link, currently i find the link div id using find element in winautomation
  3. there is two types of workflows based upon 40+ different possible webpages that randomluy appear after clicking the link above.
  4. currently i test for text on the web page if meter then player19 if discover
    then playerOther.
  5. player19 waits for 60 seconds test for the word thin k in a certain spot if
    there clicks a link if not wait a little longer. this loops about 19 times.
  6. kill the browser for cleaning up possible pop ups and stray windows. there is also in my current version script some failure testing in certain spots to start over because it their player and website is not very robust.
  7. LPlayerOther launches a link waits 60 seconds their is a countdown in a certain spot, it changes randomly from 45-35-60-30 sometimes even 1:15. so once the timer number is compared to itself over 5 seconds with no change in value that is my target timer.
  8. after countdown timer is met each iteration a link is clicked. this loops about 12 times, then restarts. there is some failure testing in certain spots here as well.

I could export the winautomation job and post it if needed but then you would have to load the winautomation software to view it. It is not simple textual script.

I think that this could be done should be done with java, or python just dont know where to start. and when i do i will probably loose some more hair, lol, learning or relearning the program script languages and never really had any luck with launching exterior programs inside java but that was ten years ago.

OK so based upon the listed work flow above how could i accomplish automating it?

1 Answers1

0
  • To launch application like Firefox after startup, use Ubuntu's Startup Applications Preferences, accessible from Dash.
  • For automation inside Firefox you may use something like iMacros for Firefox
  • To reboot the box on regular basis, set up a cron job
Mike
  • 5,691
  • In Response to the_velour_fog the question is: So I am looking for a way to automate the following.

    Upon startup launch firefox goto a certain web page. click the login link click the ok link click the music link click the webradio link then every night at 2 am or something reboot box.

    – Jeff Morgan Dec 19 '15 at 15:34