by DevilAuron on Tue Oct 02, 2007 11:16 pm
- Code: Select all
# ---------------------------------------------------------------------
# .___ .__.__ .__ .__ __
# __| _/_______ _|__| | ______ ____ |__| ____ | |___/ |_
# / __ |/ __ \ \/ / | | / ___/ / \| |/ ___\| | \ __\
# / /_/ \ ___/\ /| | |__\___ \ | | \ / /_/ > Y \ |
# \____ |\___ >\_/ |__|____/____ > |___| /__\___ /|___| /__|
# \/ \/ \/ \/ /_____/ \/
# ---------------------------------------------------------------------
#
#
# Autore: DevilAuron
# For Info: http://devilsnight.altervista.org
#
# Dev-ML - Devils Html Editor v0.2
# ---------------------------------------------------------------------
use Tk;
$mw=MainWindow->new(-background=>"black");
$mw->title("Dev-ML - Devils HTML Editor");
$mw->minsize(713,363);
$mw->maxsize(713,363);
$mw->Label(-text=>"Html Editor \n Powered By DevilAuron",-background=>"black",-foreground=>"orange")->pack(-side=>"top", -anchor=>"n");
$text=$mw->Scrolled( "Text", -scrollbars => 'osoe',
)->pack();
$text->place( -x => 56, -y => 35, -height => 300, -width => 600);
@testo=("<html>
<head>
<title>Dev-ML - Devils HTML Editor</title>
</head>
<body>
</body>
</html>
");
$text -> insert('end',"@testo");
#Aggiungi Link
$mw->Button(-text=>"Aggiungi Link",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw -> Label(-text=>"Inserisci Link",
-background=>"black",
-foreground=>"white")->pack;
$link = "http://devilsnight.altervista.org";
$sw->Entry(-textvariable=>\$link)
->pack(-anchor=>"n");
$sw->Button(-text=>"Aggiungi Link",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$ahref = "<a href=\"$link\">";
$text -> insert('end',"$ahref")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#Aggiungi Immagine
$mw->Button(-text=>"Aggiungi Immagine",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw -> Label(-text=>"Inserisci Link Immagine",
-background=>"black",
-foreground=>"white")->pack;
$img = "http://";
$sw->Entry(-textvariable=>\$img)
->pack(-anchor=>"n");
$sw->Button(-text=>"Aggiungi Immagine",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$im = "<img src=\"$img\">";
$text -> insert('end',"$im")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#Aggiungi Commento
$mw->Button(-text=>"Aggiungi Commento",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw -> Label(-text=>"Inserisci Testo",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$comm)
->pack(-anchor=>"n");
$sw->Button(-text=>"Aggiungi Commento",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$commento = "<!-- $comm --!>";
$text -> insert('end',"$commento")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#Aggiungi Testo
$mw->Button(-text=>"Aggiungi Testo",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw -> Label(-text=>"Inserisci Colore Testo",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$textcolor)
->pack(-anchor=>"n");
$sw -> Label(-text=>"Inserisci Grandezza Testo",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$textsize)
->pack(-anchor=>"n");
$sw -> Label(-text=>"Inserisci Testo",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$testo)
->pack(-anchor=>"n");
$sw->Button(-text=>"Aggiungi Link",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$testoz = "<font color=\"$textcolor\" size=\"$textsize\">$testo</font>";
$text -> insert('end',"$testoz")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#Aggiungi Textarea
$mw->Button(-text=>"Aggiungi TextArea",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw -> Label(-text=>"Inserisci Nome TextArea",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$textaname)
->pack(-anchor=>"n");
$sw -> Label(-text=>"Inserisci Larghezza TextArea",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$textacols)
->pack(-anchor=>"n");
$sw -> Label(-text=>"Inserisci Altezza TextArea",
-background=>"black",
-foreground=>"white")->pack;
$sw->Entry(-textvariable=>\$textarows)
->pack(-anchor=>"n");
$sw->Button(-text=>"Aggiungi TextArea",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$texta = "<textarea name=\"$textaname\" cols=\"$textacols\" rows=\"$textarows\"></textarea>";
$text -> insert('end',"$texta")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#Script
$mw->Button(-text=>"Aggiungi Javascript",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw->Button(-text=>"Aggiungi Alert",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$nw=MainWindow->new(-background=>"black");
$nw -> Label(-text=>"Inserisci Testo",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$alert)
->pack(-anchor=>"n");
$nw->Button(-text=>"Aggiungi",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$alertt = "<script>alert(\"$alert\")</script>";
$text -> insert('end',"$alertt")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"bottom", -anchor=>"n");
$sw->Button(-text=>"Aggiungi Redirect",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$nw=MainWindow->new(-background=>"black");
$nw -> Label(-text=>"Inserisci Link",
-background=>"black",
-foreground=>"white")->pack;
$red = "http://";
$nw->Entry(-textvariable=>\$red)
->pack(-anchor=>"n");
$nw->Button(-text=>"Aggiungi",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$redirect = "<script>window.location=\"$red\"</script>";
$text -> insert('end',"$redirect")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"top", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#Ogg Multimediali
$mw->Button(-text=>"Oggetti Multimediali",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$sw=MainWindow->new(-background=>"black");
$sw->Button(-text=>"Flash",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$nw=MainWindow->new(-background=>"black");
$nw -> Label(-text=>"Inserisci Link:",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$flashlink)
->pack(-anchor=>"n");
$nw -> Label(-text=>"Inserisci Altezza:",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$flasheight)
->pack(-anchor=>"n");
$nw -> Label(-text=>"Inserisci Larghezza:",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$flashwidth)
->pack(-anchor=>"n");
$nw->Button(-text=>"Aggiungi",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$flashlol = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"$flashwidth\" height=\"$flasheight\">
<param name=\"movie\" value=\"$flashlink\">
<param name=\"quality\" value=\"high\">
<embed src=\"$flashlink\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$flashwidth\" height=\"$flasheight\"></embed>
</object>";
$text -> insert('end',"$flashlol")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"bottom", -anchor=>"n");
$sw->Button(-text=>"Shockwave",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$nw=MainWindow->new(-background=>"black");
$nw -> Label(-text=>"Inserisci Link:",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$shocklink)
->pack(-anchor=>"n");
$nw -> Label(-text=>"Inserisci Altezza:",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$shockheight)
->pack(-anchor=>"n");
$nw -> Label(-text=>"Inserisci Larghezza:",
-background=>"black",
-foreground=>"white")->pack;
$nw->Entry(-textvariable=>\$shockwidth)
->pack(-anchor=>"n");
$nw->Button(-text=>"Aggiungi",
-background=>"black",
-foreground=>"white",
-activebackground=>"orange",
-activeforeground=>"black",
-command=>sub{
$shocklol = "<object classid=\"clsid:166B1BCA-3F9C-11CF-8075-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0\" width=\"$shockwidth\" height=\"$shockheight\">
<param name=\"src\" value=\"$shocklink\">
<embed src=\"$shocklink\" pluginspage=\"http://www.macromedia.com/shockwave/download/\" width=\"$shockwidth\" height=\"$shockheight\"></embed>
</object>";
$text -> insert('end',"$shocklol")
})->pack(-side=>"bottom", -anchor=>"n");
})->pack(-side=>"top", -anchor=>"n");
})->pack(-side=>"left", -anchor=>"s");
#DevilsNight
$mw->Button(-text=>"Devilsnight",
-background=>"black",
-foreground=>"red",
-activebackground=>"black",
-activeforeground=>"white",
-command=>sub{
system('C:\Programmi\Mozilla Firefox\firefox.exe', 'http://devilsnight.altervista.org');
})->pack(-side=>"left", -anchor=>"s");
MainLoop;
#S & S Style