Computer Hope

Software => Internet browsers => Topic started by: PaxHope on January 05, 2017, 04:13:50 AM

Title: Very simple script/automation process on a webpage
Post by: PaxHope 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)
(https://s27.postimg.org/pn0y6j49b/20139_0_unchecked.png) (https://postimg.org/image/pn0y6j49b/)
STEP 1 : clicking in a checkbox ('I agree' type of thing), http://www.rhone.gouv.fr/booking/create/20139/0 (http://www.rhone.gouv.fr/booking/create/20139/0)
(https://s27.postimg.org/ytj8tt9hr/20139_0_checked.png) (https://postimg.org/image/ytj8tt9hr/)
STEP 2 : clicking 'next',
and

(https://s27.postimg.org/r4mei38zz/20139_2_error_webpage.png) (https://postimg.org/image/r4mei38zz/)
STEP 3-a : if the next webpage to show up is the error webpage http://www.rhone.gouv.fr/booking/create/20139/2 (http://www.rhone.gouv.fr/booking/create/20139/2) > back to STEP 1, in a loop.
 
(https://s27.postimg.org/xtsxy3ubz/20139_1_epic_win.png) (https://postimg.org/image/xtsxy3ubz/)

STEP 3-b : if the next webpage to show up is the right webpage http://www.rhone.gouv.fr/booking/create/20139/1 (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

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…
Title: Re: Very simple script/automation process on a webpage
Post by: PaxHope 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
Title: Re: Very simple script/automation process on a webpage
Post by: DaveLembke 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.
Title: Re: Very simple script/automation process on a webpage
Post by: Salmon Trout 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).