dropdown menu and create button

hello i am just new to max scripting and i am really interested in making interfaces
so my question is i have a script with a drop down menu and a button, but what i want it to do is create whatever i have selected in the drop down menu. here is the code to my little script. Any help would be appriciated :)

I'm thinking it has to do with some if this is selected then do this, but i cannot figure it out have read alot of max script help but im new :(

try(closerolloutfloater MainFloater) catch()

rollout myroll "Deans ToolBox"
(
dropDownList 'ddl12' "Objects" pos:[30,17] width:137 height:40 items:#("Box", "Sphere", "Cylinder", "Tube", "Plane", "Teapot")
button 'btn5' "Create" pos:[30,80] width:137 height:36

global dsel
on ddl12 selected sel do
(
dsel = sel
)

on btn5 pressed do
(

)

)
createdialog myroll width:200 height:300

Comments

Comment viewing options

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

miauu

thank you very much that is awsome, i appriciate your help very much:)

miauu's picture

.

(
	try(destroyDialog myroll)catch()
	rollout myroll "Deans ToolBox"
	(
		dropDownList ddl12 "Objects" pos:[30,17] width:137 height:40 items:#("Box", "Sphere", "Cylinder", "Tube", "Plane", "Teapot")
		button btn5 "Create" pos:[30,80] width:137 height:36
 
		on btn5 pressed do
		(
			execute (ddl12.selected + "()")
		)
	)
	createdialog myroll width:200 height:300
)

Comment viewing options

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