home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1998 - Modelworks Software
-
- /**
- @Tool: editRecentFiles~displays a choose list of the files
- in the Recent Files list. Uncheck the items to remove files
- from the Recent Files list.
- @EndTool:
- @Summary: editRecentFiles~lets you remove files from the Recent Files list
- */
-
- var gRecentFilesMap = getMapFile("RecentFiles");
- var gOutput = getOutput();
-
- function DoCommand(commandID, menuIndex)
- {
- var fileList = gRecentFilesMap.lookup("RecentFileList", null);
- if (fileList)
- {
- var selectedList = newList();
- var position = fileList.getHeadPosition();
- while (position && position.valid)
- {
- var path = fileList.getNext(position);
- selectedList.addTail(true);
- }
-
- var resultList = chooseOptions("Recent File List",
- "Edit Recent File List", fileList, selectedList);
-
- if (resultList)
- {
- var filePosition = fileList.getHeadPosition();
- var resultPosition = resultList.getHeadPosition();
- while (filePosition.valid && resultPosition.valid)
- {
- var currentPosition = filePosition.clone();
- var path = fileList.getNext(filePosition);
- var keep = resultList.getNext(resultPosition);
- if (!keep)
- {
- fileList.removeAt(currentPosition);
- }
- }
- gRecentFilesMap.forceUpdate();
- }
- }
- }
-
-
- !!/Script
-
-