#!/usr/bin/perl -w use strict; use Tk; &hauptfenster(); sub hauptfenster { my $hauptfenster=new MainWindow(-title=>"Manuelles fahren", -width=>"640", -height=>"480"); my $text1=$hauptfenster->Label(-text=>"Drücken Sie auf die Tasten um die Mschine zu bewegen", -relief=>"groove"); $text1->place(-x=>"20", -y=>"20", -width=>"600", -height=>"50"); my $button1=$hauptfenster->Button(-text=>"hoch", -command=>sub{&fahr("oben")}); $button1->place(-x=>"270", -y=>"100", -width=>"100", -height=>"100"); my $button2=$hauptfenster->Button(-text=>"links", -command=>sub{&fahr("links")}); $button2->place(-x=>"170", -y=>"200", -width=>"100", -height=>"100"); my $button3=$hauptfenster->Button(-text=>"rechts", -command=>sub{&fahr("rechts")}); $button3->place(-x=>"370", -y=>"200", -width=>"100", -height=>"100"); my $button4=$hauptfenster->Button(-text=>"runter", -command=>sub{&fahr("unten")}); $button4->place(-x=>"270", -y=>"300", -width=>"100", -height=>"100"); MainLoop; }