11 if (mod.GetCurrentFile(file) &&
Workbench.GetAbsolutePath(file, absPath))
13 if (absPath.Length() < 2)
return;
15 absPath.Replace(
"\\",
"/");
17 if (absPath[1] !=
":")
21 absPath = cwd +
"/" + absPath;
24 int index = absPath.IndexOf(
"/");
25 int last_index = index;
30 index = absPath.IndexOfFrom(last_index + 1,
"/");
33 if (last_index == -1)
return;
35 string path = absPath.Substring(0, last_index);
37 command.Replace(
"$path",
path);
45 override void Configure()
47 Workbench.ScriptDialog(
"Configure OpenDir",
"Usage: \n$path - will be replaced with file name",
this);