hi, i have a problem, anubis created this code for me, it creates a macro file for each script you have in /scripts/test/ folder, so that you can add each script to the toolbar, not having to add every script manually!
*************************************************************
files = getFiles ((getDir #scripts) + "\\test\\*.ms")
if files.count != 0 then
(
for f = 1 to files.count do
templist[f] = getFilenameFile files[f]
for f in files do fname = FilenameFromPath f
)
outputName = getSaveFileName caption:"Save MaxScript File" \
types:"Script Files (*.mcr)|*.mcr|All Files (*.*)|*.*|"
if outputName != undefined then
(
outputFile = CreateFile outputName
for f = 1 to files.count do
(
str = "macroScript new" + (f as string) + " "
str += "category:\"phizikl_test\" tooltip:\""
str += templist[f] + "\" buttonText:\"" + templist[f] + "\"\n"
str += "(\n" + "setCommandPanelTaskMode #create\n"
str += "on execute do\n" + "(\n"
str += "filein \"" + files[f] + "\"\n" + ")\n" + ")\n"
format "%" str to:outputFile
)
close outputFile
)
edit outputName
****************************
can you try it out if it works, because it creates a .mcr file for me, but it is empty, anubis says it works for him, i dont know what the problem is...
thanks for your help!
By W DIGITAL · 2009-05-04
colinsenner · 2009-05-04