Hi, I recently Started Learning Scripting myself ......This is my first script and what i am trying to do is to use
edt1.txt as rollout name and spinner slider name....but unfortunately when i remove nameprefix variable and use usual name for parameters and spinner slider value,, script works perfectly..
but this is not something that i want..:poly141:
help me someone ..
rollout attribroll "Attribute Creator" width:180 height:150
(
pickButton btn1 "PickButton" pos:[71,24] width:91 height:34
groupBox grp1 "--CustAttributes" pos:[7,7] width:163 height:132
label lbl1 "Pick Object" pos:[15,32] width:55 height:16
label lbl2 "--Attribute Name--" pos:[39,60] width:96 height:15
editText edt1 text:"__Name" pos:[9,75] width:155 height:23
button btn2 "Create" pos:[40,104] width:93 height:25
fn obj_filt obj = classof obj == Geometryclass
on btn1 Picked obj do
(
if obj != undefined do
(
btn1.text = obj.name
Select obj
attribute_holder = emptymodifier ()
addmodifier $ attribute_holder
)
)
on btn2 pressed do
( namePrefix = edt1.text
Ca = attributes "Custattributes"
(
Parameters objparameters rollout:objRol
(
namePrefix type:#float Range:[0,100,0] ui:(objsn, objsl)
)
Rollout objrol (namePrefix + "")
(
Spinner objsn "" range:[0,100,0]
Slider objsl (nameprefix + "") range:[0,100,0] offset:[0,-20]
)
)
custattributes.add $.modifiers[1] ca
)
)
Createdialog attribroll
Dont laugh at this little script, its for learning purposes......:poly142: