Skip to main content
Known Participant
September 23, 2009
Question

CS4Open Recent Files...

  • September 23, 2009
  • 1 reply
  • 611 views

Hello all,

I'm trying to implement a menu item in my plugin like what we have in Open recent files in Adobe(or other apps), but the files that I want to open in my plugin are NOT '.indd' files. I know how to implement dynamic menu and handle other stuff as demonstrated in some sample plugins, the part I'm not sure is

what is the best approach to keep the list of my files( IDFile/Filename/Fullpath)? and how to Save/Restore them in my plugin(Windows & Mac)?

Any ideas/thoughts appreciated.

Regards,

Mor

This topic has been closed for replies.

1 reply

Known Participant
September 30, 2009

I checked a sample plugin in CS4, it looks that the list of recent open files can be retrieved by a query to Application like this:

...

InterfacePtr<IDocumentList> docList(app->QueryDocumentList());

InterfacePtr<IFileList> fileList(docList, IID_IFILELIST);

....

and the only thing we need to save is the length of this list for next run. I was thinking to save the full-path to my files and parse it for each run of inDesign(to build the recent menu), but when I saw the sample above, thought it could exist better/shorter approach for that.

Any thoughts?

Appreciated again,

Mor