Hi!
this is one of my favorite scripts, or was, since it crashes my Max 2014 nowadays.
Original credits: I dont remember :( I searched for the internet, but couldn't find where I found this script in the first place.
Great many thanks to the original author anyway. :)
macroScript MacroscriptLister
category:"Haider"
toolTip:"Macroscript Lister..."
buttontext:"Macroscript Lister..."
(
(
rollout macroList "Macroscript List" (
local mcrCategories;
local mcrNames;
local mcrTexts;
dropdownlist categoryList;
dropdownlist mcrNamesList;
button runMcr "Run";
on categoryList selected arg do (
mcrNamesList.items = mcrTexts[arg];
)
on runMcr pressed do (
--try (
macros.run categoryList.selected mcrNames[categoryList.selection][mcrNamesList.selection];
--) catch ()
)
)
local mcrCategories = #();
local mcrNames = #();
local mcrTexts = #();
local mcrFiles = #();
local mcrStream = stringstream "";
macros.list to:mcrStream;
seek mcrStream 0;
while (not (eof mcrStream)) do (
local line = (readDelimitedString mcrStream "\n");
local lineSplit = (filterString line "\"");
local mcrName = lineSplit[2];
local mcrCategory = lineSplit[6];
local mcrFile = lineSplit[8];
local catIndex = (findItem mcrCategories mcrCategory);
if (catIndex == 0) do (
append mcrCategories mcrCategory;
append mcrNames #();
append mcrTexts #();
append mcrFiles #();
catIndex = mcrCategories.count;
)
append mcrNames[catIndex] mcrName;
append mcrTexts[catIndex] mcrName;
append mcrFiles[catIndex] mcrFile;
)
local grinIndex = (findItem mcrCategories "Grin tools");
if (grinIndex != 0) do (
if (mcrFiles[grinIndex] != undefined) do (
for i = 1 to mcrFiles[grinIndex].count do (
local mcr = openFile mcrFiles[grinIndex][i];
if (mcr != undefined) do (
seek mcr 0;
skipToString mcr "toolTip:";
readDelimitedString mcr "\"";
local newName = readDelimitedString mcr "\"";
if (newName == "") do (
seek mcr 0;
skipToString mcr "buttonText:";
readDelimitedString mcr "\"";
newName = readDelimitedString mcr "\"";
)
if (newName != "") do mcrTexts[grinIndex][i] = newName;
)
)
)
)
createdialog macroList width:400 style:#(#style_toolwindow, #style_sysmenu);
macroList.categoryList.items = mcrCategories;
macroList.mcrNames = mcrNames;
macroList.mcrTexts = mcrTexts;
cui.RegisterDialogBar macroList;
)
)
By Haider of Sweden · 2014-03-04
miauu · 2014-03-14