Open recent file hotkey

Open recent file hotkey

o.safonov82VMW
Explorer Explorer
251 Views
2 Replies
Message 1 of 3

Open recent file hotkey

o.safonov82VMW
Explorer
Explorer

I need a command to open the last saved file. I want to open the last file by hot key

0 Likes
Accepted solutions (1)
252 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Its a bit hacky because it uses optionVar to read out the filepath from the UI of the recent files. There is probably a more elegant way to do this using the API. But this MEL script does what you want:

string $recent[] =`optionVar -q RecentFilesList`;
string $last = $recent[(size($recent)-1)];
file -o $last;

 

I hope it helps!

Message 3 of 3

o.safonov82VMW
Explorer
Explorer
Thank you very much! I can spend more time with my family 😉