Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore most recently used list (MRU)

Status
Not open for further replies.

teresas

Programmer
Sep 8, 2000
91
US
I often work with mapped drives. Occasionally, I inadvertently open VFP before I've mapped the drives, and this will wipe out my most recently used (MRU) list. I'd like to be able to restore it to its previous configuration.

I've looked at the resource file (foxuser.dbf) and discovered there are several records with field ID=MRU* (MRUI, MRUS, etc.) but don't know which of these to edit and if so, how.

Or, is the MRU info stored in the Windows registry, and is it possible to edit it there?

I am using version 9 and have turned off the Task Pane Manager.

Teresa
 
On my system it is the MRUL. Also, you will need to figure out what those delimiters are that they're using...probably Chr(0) and Chr(4).

boyd.gif

SweetPotato Software Website
My Blog
 
Craig,

Yes, you are correct that "MRUL" is the record I was looking for. I took your hint and was able to determine that the delimiters in the foxuser.data field were CHR(4)+CHR(0) at the beginning, CHR(0) between entries, and two or three CHR(0) at the end. I tried editing the foxuser.data field, but when my edits didn't take, I guessed that it was because the foxuser.ckval field wasn't correct.

So, I tried a different approach that will not restore the list to its immediately previous configuration, but can restore it to a configuration that I have saved.
Code:
USE SYS(2005) AGAIN
SET FILTER TO id = "MRUL"
BROWSE LAST NOWAIT 

USE JUSTPATH(SYS(2005)) + "\FOXUSERMRULSAVE" IN 0
SELECT FOXUSERMRULSAVE
SET FILTER TO id = "MRUL"
BROWSE LAST NOWAIT 

REPLACE foxuser.ckval WITH foxusermrulsave.ckval
REPLACE foxuser.data WITH foxusermrulsave.data

CLOSE TABLES ALL

Teresa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top