|< 1 2 3 >| | 25 Einträge, 3 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# *****************************************************************************
# ** Sub LADE PROGRAMM *******************************************************
# *****************************************************************************
sub Load_Perl_Prog {
my $file_typ = [
['PERL Program', '.pl' ],
['All Files', '*' ],
];
my $dn = $mw->getOpenFile(-filetypes=>$file_typ);
if (defined $dn and $dn ne '') {
$laden_entry->delete(0, 'end');
$laden_entry->insert('end', $dn);
}
}
1
2
3
4
use File::Basename;
my $file = '/homes/reneeb/test.txt';
my $dirname = dirname($file);
print $dirname,"\n";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/perl -w
use strict;
use warnings;
use diagnostics;
use Tk;
use Tk::FileSelect;
my $mw = MainWindow->new();
my $fs = $mw->FileSelect(-directory => '.', # Startordner
-verify => [-'d']); # nur Ordner dürfen ausgewählt werden
my $selected_dir = $fs->Show();
print $selected_dir,"\n";
MainLoop;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# *****************************************************************************
# ** Sub LADE PATH ************************************************************
# *****************************************************************************
sub Load_Path {
my $file_typ = [
['PERL Program', '.pl' ],
['All Files', '*' ],
];
my $dn = $mw->getOpenFile(-filetypes=>$file_typ);
my $file = $dn;
my $dn = dirname($file);
print "Pfad ist: $dn";
if (defined $dn and $dn ne '') {
$laden_entry->delete(0, 'end');
$laden_entry->insert('end', $dn);
}
}
|< 1 2 3 >| | 25 Einträge, 3 Seiten |