script to ui installer

hello!
i have so many useful scripts by now, but no way of accesing them instantaneously,
is there an easy way to access my scripts on startup of max through the customize UI section, i know macroscripts can do this, but theres many scripts i have that arent macroscript, i just want to add them to my toolbar?!

any help would be greatly appreciated!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
W DIGITAL's picture

hi anubis, i have tried the

hi anubis,
i have tried the script but it deosnt save a file for me ?
please help

W DIGITAL's picture

jes if undefined nothing

jes if undefined nothing happens, but of course i write a name, and at least it does save the test file! but with nothing in it,
does it matter where the macrocomposer.ms is sitting, lets say on the desktop or in scripts folder?

Anubis's picture

if outputName != undefined

if outputName != undefined then
is used to check is save dialog confirmed or canceled, so if you cancel no file saved. but why for you save empty file?... that's strange.

my recent MAXScripts RSS (archive here)

W DIGITAL's picture

i also try it on computer

i also try it on computer here in office, doesnt work :(

i have a question

if outputName != undefined then

does it only create macro if output name undefined?

because it asks to save maxscript you have to enter name, which means, you define it ? so thats why the macro is empty?

i have tried putting the script even in scripts folder but doesnt change,

i get a macro file, but it is empty...

Anubis's picture

((getDir

((getDir #maxroot)+"\\scripts") = (getDir #scripts) ie they are return the same path. I'm to using max2009 x64 and realy have no idea why the script dont work for you ?!

my recent MAXScripts RSS (archive here)

W DIGITAL's picture

str += "filein \"" +

str += "filein \"" + files[f] + "\"\n" + ")\n" + ")\n"

isthis the problem is it whee the maxroot is missing?

W DIGITAL's picture

MacroScript new01

MacroScript new01 category:"phizikl" tooltip:"Animate It" buttonText:"at"
(
setCommandPanelTaskMode #create
on execute do
(
filein ((getDir #maxroot)+"\\scripts\\phiZikl\\Animation_Timer_v1.8.ms")
)
)

***this code creates a file for me,***

files = getFiles ((getDir #maxroot)+"\\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:\"test\" tooltip:\"aa"
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

**************
this code doesnt,

thats so weird (tried with maxroot as well, im using max2009 64bit

W DIGITAL's picture

strange :) i know your code

strange :)

i know your code works something with directory problem
my directory is
C:\Program Files\Autodesk\3ds Max 2009\Scripts\test

( i also try it with phiZikl folder which has 20scripts, and my "manual" code works for that)

macroScript new01 category:"phizikl" tooltip:"Animate It" buttonText:"at"
(
setCommandPanelTaskMode #create
on execute do
(
filein ((getDir #maxroot)+"\\scripts\\phiZikl\\Animation_Timer_v1.8.ms")
)
)

maybe thats the problem?

MAXROOT is missing?

W DIGITAL's picture

ijes i changed the last line

ijes i changed the last line now,

now it creates a macro file!

only it is empty :)

under Scripts/test/ i have two files now test.ms and rest.ms just for example,

it produces file but no code inside,
weird

Anubis's picture

There is the file attached

There is the file attached

AttachmentSize
MacroComposer.ms 816 bytes

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.