El codigo
Código
#!usr/bin/perl #ASCII Art 0.1 #Version Tk #Coded By Doddy H #Thanks to : reLlene,MARKO,explorer use Tk; use Tk::Dialog; use List::Util "max"; if ( $^O eq 'MSWin32' ) { use Win32::Console; Win32::Console::Free(); } my %letras = ( a => " @ @ @ @ @ @ @ @ @ @ @@@@@ @ @ @ @ ", b => " @@@@ @ @ @ @ @ @ @@@@ @ @ @ @ @ @ @@@@ ", c => " @@@@ @ @ @ @ @ @ @ @ @ @@@@ ", d => " @@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@@ ", e => " @@@@@ @ @ @ @@@@ @ @ @ @@@@@ ", f => " @@@@@ @ @ @ @@@@ @ @ @ @ ", g => " @@@@ @ @ @ @ @ @@@ @ @ @ @ @ @@ @@@ @ ", h => " @ @ @ @ @ @ @ @ @@@@@@ @ @ @ @ @ @ @ @ ", i => " @ @ @ @ @ @ @ @ @ ", j => " @ @ @ @ @ @ @ @ @ @ @@ ", k => " @ @ @ @ @ @ @@ @@ @ @ @ @ @ @ @ @ ", l => " @ @ @ @ @ @ @ @ @@@@@ ", @ @ @ @ @@ @@ @@ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", n => " @ @ @@ @ @@ @ @ @ @ @ @ @ @ @ @ @ @@ @ @@ @ @ ", o => " @@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@@ ", p => " @@@@@ @ @ @ @ @ @ @@@@@ @ @ @ @ ", @@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @@@@ @ ", r => " @@@@@ @ @ @ @ @ @ @@@@@ @ @ @ @ @ @ @ @ ", @@@ @ @ @ @ @@@ @ @ @ @ @@@ ", t => " @@@@@ @ @ @ @ @ @ @ @ ", u => " @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@@ ", v => " @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", W => " @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", x => " @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", @ @ @ @ @ @ @ @ @ @ @ @ @ ", z => " @@@@@@@ @ @ @ @ @ @ @ @@@@@@@ " ); my $color_fondo = "black"; my $color_texto = "green"; my $ven = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ven->title("ASCII Art 0.1 || Written By Doddy H"); $ven->geometry("555x300+20+20"); $ven->resizable( 0, 0 ); my $fondo = $ven->Text( -width => 75, -heigh => 15, -background => $color_fondo, -foreground => $color_texto $ven->Label( -text => "Text : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto my $tengo = $ven->Entry( -width => 40, -background => $color_fondo, -foreground => $color_texto $ven->Button( -command => \&now, -text => "Now!", -width => 10, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto $ven->Button( -command => \&about, -text => "About", -width => 10, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto $ven->Button( -command => \&exitnow, -text => "Exit", -width => 10, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto MainLoop; sub about { $ven->Dialog( -title => "About", -buttons => ["OK"], -text => "Coded By Doddy H", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } sub exitnow { } sub now { $fondo->delete( "0.1", "end" ); my $now = $tengo->get; my $code = artnow($now); $fondo->insert( "end", $code ); } sub artnow { my $fondo = " "; my $espacio = 0; my $lugar; my @lotengo; my $tipox = $letras{"a"}; $altura = @lineas + 1; for ( 1 .. $altura ) { } for my $i ( 0 .. $altura - 1 ) { ( my $plan = $lineas[$i] ) =~ s/ /$fondo/g; $plan = $fondo x $anchura if not $plan; } $lugar += $anchura + $espacio; } } #The End ?
Una imagen