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
Comments (4)
Comment policy
ok thanks,
but does it macrofiy them so i can use them in my toolbar?
thats the main goal im trying to achieve, get my scripts into toolbar!
thanks for your help!
It does exactly what you want, check the scripts/test directories for .ms files and loads them at startup. I saved that script to a file called "myscripts.ms" and put them in the C:\Program Files\Autodesk\3dsMax 2009\stdplugs\stdscripts\ folder and now everytime I load max, it'll check the /test directory for script updates. I use a network directory to distribute my scripts to all my coworkers so I can update them easily and transparently.
what exactly does it do??? :)
sorry im not a programmer ^_°
I use this one for my scripts
This'll also get subdirectories of /test/ if you want that too.