ScriptSpot

Forum topic · General Scripting

Drop Downs

By Shade926 · 2013-03-25

Description

Hi There

Im very new to Max Script and am looking for some help

Im trying to create a UI and im needing to make various shapes using a drop down list.
Basically i want to select an object from the drop down list and it will make it in max.
This is what ive got so far:
try (destroydialog test_button) catch ()

rollout test_button "Reset Max"
(

button theButton "Reset Max"---Creates Button

on theButton pressed do---When pressing Button
resetMaxFile #noprompt---Resets Max File

dropdownlist scale_dd "Shape:" items:#("Box", "Plane", "Pyramid", "Cone")
on scale_dd selected i do
format "You selected '%'!\n" scale_dd.items[i]---???????????????
)

createDialog test_button 500 300

Will be grateful for any help

Thanks

Comments (5)

Shade926 · 2013-03-26

Also is there a way to select that created object afterwards???

miauu · 2013-03-26

This is one of the ways you can use.


on scale_dd selected i do
(
	execute (scale_dd.selected + "()")
)

Thanks

Shade926 · 2013-03-26

You are a genius

Thanks so much!!

Shade926 · 2013-03-26

Also is there a way to select that created object afterwards???

;)

barigazy · 2013-03-26


execute (scale_dd.selected + " isSelected:on")