Hmm, I get the same -603. I'm using WinXP. Is that "l" between "OpenSavePid" and "MRU\" correct?
OK. I tried it on win7, so you will need to navigate to that key in registry and figure out if it is different in winxp.
Mine looks like this:
One step closer!
This is it for XP:
Error moved over to after "Read Registry Value Simple.vi"
Something wrong with "MRUListEx"?
Can you see that subkey in your registry? As I said before, that bit is undocumented, I came across it in some random post when I had to do something similar. So it may be completely different in xp!
Yes, in each extension folder there is a subkey "MRUList". I changed the the read argument to that. The -603 Error moved to after the next and final "Read Registry Value Simple.vi" The input is "102" if looking for *. It changes to "106" for "bmp"
That's not right. You need to see how that value correlates to a value in the list. Can you post a screenshot of your registry like mine above?
If you look at my screenshot, my first byte is 0x0a which corresponds to 10 in the list, which is the list index of the last file opened in that extension subfolder.
That looks easy. So instead passing number string, just pass the first letter. Use string subset function or something similar (so in the sscreenshot it looks like f is your list index ) and you will have the file name from the next read function. You don't need to call shell32dll.
Getting closer. Using * shows the path to the screen shot.jpg that I just sent you! If I change the search to bmp, it shows the path to the last bmp. But if I go to Windows explorer, load a Excel .xlsx, save that file with a different name, then run the Registry thing with *, it still shows the screen shot.jpg. If I then change the search to xlsx, it shows a path an Excel file opened weeks ago, not the one I just opened and resaved. Well, I'll look at it some more tomorrow. Thanks aCe.
Final thoughts for this in WIn XP. After getting the Registry MRU to read, I tested it and found that not all applications update the lists immediately, if at all. MS Paint, and MS Notepad do, but only from within the application using the File>Open pulldown. MS Word, and MS Excel don't update the lists at all. And unfortunately, my target application doesn't either. This approach does work, but in XP, not that well. Kudos for aCe anyway! Very clever.