Just as an fyi, most products use the registry for this. If you open regedit and search for MRU, you will find the general structure most apps use in the registry for this. Technically, all you really need to do is to create a new hive for your product under hklm\software\yourcompanyorappname\MRU\ and then have each file as a separate value. Most companies use the HKU hive, but it requires more effort on your part to get the username and resolve that to subhive of HKU. Either way you want to go, unless there are some VERY tight security, the registry is the "proper" way to store this sort of thing instead of a file.
Joe Frazier, Jr Technical Support Engineer Peopleclick.com 800-841-2365 [EMAIL PROTECTED] > -----Original Message----- > From: Peter Eisengrein [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 12, 2001 8:46 AM > To: 'perl-win32-gui-users@lists.sourceforge.net' > Subject: RE: [perl-win32-gui-users] Most-Recently-Used files > > > 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 > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >