I'd simply write the path\file to a data file somewhere and read it before
you contruct your menu. You would write to this file every time someone
opens or creates a file. You would probably also want to create a subroutine
that limits how many files are kept, as such:

### untested!

### At the beginning of the script this sub would get called like
&recentFilenames();


### during your open file sub do something like this. $file = the file you
just opened 
&recentFilenames(open,$file);


###
sub recentFilenames
{
        my ($what,$file) = @_;
        if ($what eq "open")
        {
                open(FILE,">>$recentFiles");
                print FILE "$file\n";
                close(FILE);
                push(@recentFiles,$file);
                shift(@recentFiles);
        }
        else
        {
                open(FILE,"$recentFiles");
                @recentFiles=<FILE>;
                close(FILE);

                [EMAIL PROTECTED];
                while ($count > "5")   ### however many files you want to
remember.
                {
                        shift(@recentFiles);
                }

        }


        ### do your menu here, using @recentFiles

}


        

-----Original Message-----
From: A [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 11, 2001 3:30 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Most-Recently-Used files


Hi,
Does anybody have an idea how to implement a  Most-Recently-
Used files (last used files)?
It is mostly in File menu.
I mean similar to MS WORD, MS EXCEL, COREL and many other 
applications.
Thanks

Ladislav



------- End of forwarded message -------

_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

Reply via email to