R
Robin
use strict;
use Tk;
my ($a1, $a2, $a3, $a4, $a5, $a6);
my $m = new MainWindow ();
$m -> Dialog (-text=>"Copy color names to the clipboard") -> Show();
$m -> Label (-text=>" ", -background=>"purple") -> grid (my $c1
= $m -> Checkbutton (-variable=>\$a1) );
$m -> Label (-text=>" ", -background=>"blue") -> grid (my $c2 =
$m -> Checkbutton (-variable=>\$a2) );
$m -> Label (-text=>" ", -background=>"green") -> grid (my $c3 =
$m -> Checkbutton (-variable=>\$a3) );
$m -> Label (-text=>" ", -background=>"black") -> grid (my $c4 =
$m -> Checkbutton (-variable=>\$a4) );
$m -> Label (-text=>" ", -background=>"white") -> grid (my $c5 =
$m -> Checkbutton (-variable=>\$a5) );
$m -> Label (-text=>" ", -background=>"red") -> grid (my $c6 =
$m -> Checkbutton (-variable=>\$a6) );
$m -> Button (-background=>"lightblue", -command=>\&c, -text=>"Copy
color name to clipboard") -> grid ($m -> Label (-text=>"Great, thanks
for using me...", -background=>"black", -foreground=>"white"), $m->
Button (-text=>"Clear clipboard", -command=>\&cl) );
$m -> configure (-title=>"Cool color picker");
MainLoop();
sub c () {
if ($a1) {
$m -> clipboardAppend(" purple ");
}
if ($a2) {
$m -> clipboardAppend(" blue ");
}
if ($a3) {
$m -> clipboardAppend(" green ");
}
if ($a4) {
$m -> clipboardAppend(" black ");
}
if ($a5) {
$m -> clipboardAppend(" white ");
}
if ($a6) {
$m -> clipboardAppend(" red ");
}
}
sub cl () {
$m -> clipboardClean ();
}
use Tk;
my ($a1, $a2, $a3, $a4, $a5, $a6);
my $m = new MainWindow ();
$m -> Dialog (-text=>"Copy color names to the clipboard") -> Show();
$m -> Label (-text=>" ", -background=>"purple") -> grid (my $c1
= $m -> Checkbutton (-variable=>\$a1) );
$m -> Label (-text=>" ", -background=>"blue") -> grid (my $c2 =
$m -> Checkbutton (-variable=>\$a2) );
$m -> Label (-text=>" ", -background=>"green") -> grid (my $c3 =
$m -> Checkbutton (-variable=>\$a3) );
$m -> Label (-text=>" ", -background=>"black") -> grid (my $c4 =
$m -> Checkbutton (-variable=>\$a4) );
$m -> Label (-text=>" ", -background=>"white") -> grid (my $c5 =
$m -> Checkbutton (-variable=>\$a5) );
$m -> Label (-text=>" ", -background=>"red") -> grid (my $c6 =
$m -> Checkbutton (-variable=>\$a6) );
$m -> Button (-background=>"lightblue", -command=>\&c, -text=>"Copy
color name to clipboard") -> grid ($m -> Label (-text=>"Great, thanks
for using me...", -background=>"black", -foreground=>"white"), $m->
Button (-text=>"Clear clipboard", -command=>\&cl) );
$m -> configure (-title=>"Cool color picker");
MainLoop();
sub c () {
if ($a1) {
$m -> clipboardAppend(" purple ");
}
if ($a2) {
$m -> clipboardAppend(" blue ");
}
if ($a3) {
$m -> clipboardAppend(" green ");
}
if ($a4) {
$m -> clipboardAppend(" black ");
}
if ($a5) {
$m -> clipboardAppend(" white ");
}
if ($a6) {
$m -> clipboardAppend(" red ");
}
}
sub cl () {
$m -> clipboardClean ();
}