Ok, here’s the deal:
A website is holding a weekly contest in which you are rewarded for correctly predicting a pitcher’s performance in his next start.
There are four text boxes: hits, walks, strikeouts, and earned runs. After you have filled out the boxes with your guess and have provided your contact information, you hit “send”. This sends the website your guess and gives you a confirmation page.
Lame contest, right? Here’s where it gets interesting: they explicitly state that you can enter the contest up to 100 times each week. The programmer in me saw this and started drooling…this will be easy, I figured. All I have to do is set “tolerance” values (i.e. I think the pitcher will have 3-6 hits, 0-1 walks, 4-8 strikeouts, 2-4 earned runs). Then I just set up a program that will simply run 4 nested loops to bang out every permutation of my guesses.
Of course, I could manually enter the 100 values, changing one number each time. But that’s no fun
So here’s my question: how can I write a program that will do the grunt work for me? I took a look at the source code of the page, but that didn’t show me anything interesting, and I don’t know any Perl. I’m learning Java, but I’ve only gotten to the “Hello World” stage. The only thing I can think of would be to write a Visual Basic program that just uses SendKeys() to send the text to the text boxes, hits enter for me, waits a few seconds, sends “alt+left” to go back, types in the new set of numbers, sends again, and so forth.
This seems to be a terribly ineligant and inefficient way to do it, though. I know people write little programs to spam voting scripts and such, but in this case, something like that would actually be legitimate and wouldn’t violate the rules of the contest. Any thoughts on how I could do it, aside from my horrible VB method?