Hacking del Doodle de Google usando Perl (Basketball)

Al igual que el de ayer, el de hoy usa la misma lógica, pero un poco mas compleja por el calculo de fuerza, un error que puede disminuir el tiempo en el de ayer es darle clic rápidamente a la imagen.

Aquí dejo el código del de hoy:

#!/usr/bin/perl -w
use X11::GUITest qw/ PressKey ReleaseKey WaitSeconds /;
sleep 2;
for my $shoot1 ( 1 .. 5 ) {
        PressKey(space);
        WaitSeconds(0.27);
        ReleaseKey(space);
        WaitSeconds(0.8);
print “Bucle 1, tiro $shoot1\n”; }

for my $shoot2 ( 1 .. 4 ) {
        PressKey(space);
        WaitSeconds(0.5);
        ReleaseKey(space);
        WaitSeconds(0.75);
print “Bucle 2, tiro $shoot2\n”; }

for my $shoot3 ( 1 .. 4 ) {
        PressKey(space);
        WaitSeconds(0.72);
        ReleaseKey(space);
        WaitSeconds(0.7);
print “Bucle 3, tiro $shoot3\n”; }

for my $shoot4 ( 1 .. 4 ) {
        PressKey(space);
        WaitSeconds(0.82);
        ReleaseKey(space);
        WaitSeconds(0.75);
print “Bucle 4, tiro $shoot4\n”; }

for my $shoot5 ( 1 .. 4 ) {
        PressKey(space);
        WaitSeconds(0.88);
        ReleaseKey(space);
        WaitSeconds(0.7);
print “Bucle 5, tiro $shoot5\n”;}

Nerds Doesn’t sweat! xD

Como me comentaron ayer, #LikeABoss

y El Screencast: