Hi .dave.

This is what I have done so far:
use Tk; use strict; use Tk::Text; use Tk::Frame; use File::Find; use Tk::Scrollbar; use Tk::Adjuster; use Win32::Perms; my $path = shift @ARGV; my $mw = new MainWindow; $mw->geometry('500x400'); my $left_frame = $mw->Frame; my $adjuster = $mw->Adjuster(-widget=> $left_frame, -side=>'left'); my $right_frame = $mw->Frame; my %dirs; find(sub { $dirs{$File::Find::dir}++;}, $path); my ($list_box) = $left_frame->Scrolled('Listbox', -height=>'0', -width=>'0', -scrollbars=>'e', ); my ($output_text) = $right_frame->Scrolled('Text', -height=>'1', -width=>'1', -scrollbars=>'osoe',); $list_box->insert('end', sort keys %dirs); $list_box->bind('<ButtonRelease-1>',sub {get_perms();}); $left_frame->pack(qw/-side left -fill y/); $adjuster->pack(qw/-side left -fill y/); $right_frame->pack(qw/-side right -fill both -expand 1/); $list_box->pack(qw/-side left -fill both -expand 1/); $output_text->pack(qw/-side bottom -fill both -expand 1/); + MainLoop; exit 0; sub get_perms { my ($indx) = $list_box->curselection(); my $path = $list_box->get($indx); my $perms = new Win32::Perms($path) || die "\n$^E\n"; print "Path: " . $perms->Path(); my $counter = $perms->Get(\ my @list); $output_text->delete('0.1','end'); foreach my $item (@list) { while (my ($field, $value) = each %$item) { next if ($field !~ /account|access/i ); $output_text->insert('end', $field.": ".$value.",\t"); } $output_text->insert('end',"\n"); } }

This script will create two windows, the one on the left is where all the directories will be displayed and on the right is where the users or groups that have access to the directory will be displayed.

Now: what I would like to achieve are the following :

1-On the right windows, displaying users and groups as Icons (like an icon with a drawing of face for a users and two faces for a group-similar to what you get in User Manager) instead of displaying them in text.

2- Clicking on a user icon and dragging it then dropping it on an icon representing a group will move the user to that group.

3- On the left Window, where the directory structures are displayed, I would like to have a display similar to what you get if you had used Tk::DirTree -if I can. Also a single click on a directory will display the user permissions on the right window (which the script does that anyway) and double click will assign a variable to the selected path, so I can do other things with that path.

4- Instead of passing the path as @ARGV, it would be better if I could have an entry field (in the top left hand corner of the window) where I can pass the path in there and bind the Enter (or Return) key to that field.

Once I get the hang of the above points, I can contribute towards answering similar quires on PerlMonks –Hopefully ;-)

Many Thanks,I just can't express how much I do appreciate your help.

In reply to Re: Re: Perl::Tk and Win32::Perms Startup help by blackadder
in thread Perl::Tk and Win32::Perms Startup help by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.