Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Very simple script/automation process on a webpage  (Read 4150 times)

0 Members and 1 Guest are viewing this topic.

PaxHope

    Topic Starter


    Newbie

    • Experience: Experienced
    • OS: Mac OS
    Very simple script/automation process on a webpage
    « on: January 05, 2017, 04:13:50 AM »
    Hello there good people,

    SITUATION
    I am a foreigner living in France and in order to be able to drive car here, I must register on a governmental website and find a suitable date for an appointment. Bureaucracy. Meh. The bad thing is, availability is extremely scarce and the only thing I've had for the moment is disappointment...

    PROBLEM
    An employee told me they put new available time slots online every Sunday at 11:59 PM, some sort of a weekly renewal if you like. I have tried from 11:30 PM to 02:20 AM, filling the same form over and over and over, for 8 weeks but nothing ever happened :( I am feeling really confused and a bit angry.

    SOLUTION ?
    I am asking for your help in the making of an automated process (OSX based, ideally, but Windows works)

    STEP 1 : clicking in a checkbox ('I agree' type of thing), http://www.rhone.gouv.fr/booking/create/20139/0

    STEP 2 : clicking 'next',
    and


    STEP 3-a : if the next webpage to show up is the error webpage http://www.rhone.gouv.fr/booking/create/20139/2 > back to STEP 1, in a loop.
     


    STEP 3-b : if the next webpage to show up is the right webpage http://www.rhone.gouv.fr/booking/create/20139/1 > playing a super crazy loud alert sound on computer (+ sending an email, an SMS, whatever will do. This is optional but would be so cool).

    ADDITIONAL NOTE
    • The server doesn't look rock-solid and I've had quite a few "Error 502 : bad gateway" blank screens, as well as another "Error 503 guru meditation" message. The script should know how to "react" in such cases.
    • A log file would be absolutely great (see 'GOOD TO KNOW'). Date + Time + Attempt nbr X for instance.

    I've found a few automation processes online, but they don't seem to fit in this particular scenario :s

    Be free, be wild, think outside the box, brainstorm this baby!
    Thank you so much in advance :)

    GOOD TO KNOW
    I might need a log file in order to prove that the administration is actually not putting new time slots. It may very well help my case…

    PaxHope

      Topic Starter


      Newbie

      • Experience: Experienced
      • OS: Mac OS
      Re: Very simple script/automation process on a webpage
      « Reply #1 on: January 05, 2017, 08:27:39 AM »
      I'm starting to find a solution here... but the battle isn't over yet :)
      Any help is welcome!

      http://forum.imacros.net/viewtopic.php?f=11&t=27092&p=72328#p72323

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Very simple script/automation process on a webpage
      « Reply #2 on: January 05, 2017, 09:44:59 AM »
      For automation like that I use JitBit Macro Recorder. You Click to start recording what you are doing, fill out the form completely the first time and when done click end recording. You then can compile it as an EXE and call to it in a scheduled task. As long as the pages load without any problems and the layout doesnt change at the website then it will submit an additional form to them with your info. Only thing though is that through this it sounds like you might have to select a time slot that works for you, so it might not be able to be automated. Automation works best when your working with a fixed pattern and locations on the screen to clock and select and enter information in. However automation gets overly complicated if you need it to make decisions based on what if on the screen. I only use automation when the routine is completely redundant such as some online games that require you to do something at timed intervals. Because the way the game or website is doesnt change you can automated it, but if your up against having to make selections based on an unpredictable dynamic response from the website, that is where it gets far more complicated than just a macro by itself.

      Do you need to select a time slot from a list of available time slots? Additionally there might be an anti formspam feature at this site in which only one request can be made per timed interval per account as a means to keep people from hitting the server over and over again quickly similar to blocks that radio stations have on people using dialer tools to try to be the 3rd caller at a radio station to win stuff.

      Salmon Trout

      • Guest
      Re: Very simple script/automation process on a webpage
      « Reply #3 on: January 05, 2017, 11:26:17 AM »
      Quick sanity check... my phrase of the moment... do we really do that? I mean helping script a bot to hit up a government site? I can imagine what the mods at Autoit forum would say (take a week's ban while you think about what you were asking).