Reply To: Way to quickly open frequently used file

Product Compare Forums Multi-Edit Suggestions Way to quickly open frequently used file Reply To: Way to quickly open frequently used file

#5930
BrentStroh
Participant

If you’re on 9.10.04, try View|Files. This is essentially a ‘Favorites’ type list for MEW.

If you’re looking for a file with a known extension in a known location, be sure Default Directory is filled in on the extension setup dialog.

If your files happen to reside in the current directory for MEW, the directory of the active open file, the project root directory, etc, this might be useful:

[code:2e0v5rpz]Macro_File QuickOpen;

#include Win32.sh
#include MeTools.sh

void QuickOpen {
str name, dir;

Return_Str = "";
Rm( "UserIn^QueryBox /P=Open File:/NAS=1/W=40/ML=40/T=Quick Open File" );
if ( Return_Int == 0) {
return();
}
name = Remove_Space( Return_Str );

if ( Get_Extension(name) == "" ) {
name = name + "." + Get_Extension(File_Name);
}

Return_Str = name;
RM("SetFileName");
name = Return_Str;

if (File_Exists(name)) {
rm("LDFiles /FN=" + name + "/LC=1/NR=1/NM=1/NRL=1" );
return();
}

dir = Get_Path(File_Name);
if (File_Exists(dir + "\\" + name)) {
rm("LDFiles /FN=" + dir + "\\" + name + "/LC=1/NR=1/NM=1/NRL=1" );
return();
}

dir = Global_Str("!PrjRootPath");
if (File_Exists(dir + "\\" + name)) {
rm("LDFiles /FN=" + dir + "\\" + name + "/LC=1/NR=1/NM=1/NRL=1" );
return();
}

dir = FExpand("");
if (File_Exists(dir + "\\" + name)) {
rm("LDFiles /FN=" + dir + "\\" + name + "/LC=1/NR=1/NM=1/NRL=1" );
return();
}
make_message("Can’t find " + name + " to open it!");
}[/code:2e0v5rpz]