-- macroscript Modadder category:"ModAdder" ( -- for if you want to put in a macroscript Customize menu > User interface > Category Modadder > add to UI of choice -- see parenthesis at bottom to close global kupo -- so you can access kupo controls from another rollout global modsArray465 -- just for randomness rollout kupo "List" ( MultiListBox lbx1 "Mod" --pos:[3,1] width:156 height:4 button btn2 "Refresh" --pos:[3,80] width:73 height:17 button btn3 "Paste" --pos:[86,80] width:73 height:17 radiobuttons PasteAllorSel labels:#("sel","all") radiobuttons copyOrInst labels:#("copy","instance") on btn2 pressed do ( lbx1.items = #() modsArray465 = undefined ) on btn3 pressed do ( print lbx1.selection -- notice this is a bit array undo "paste mod" on -- so we can undo it ( selNow = GetCurrentSelection() if modsArray465 != undefined and modsArray465.count > 0 then ( for i in SelNow do -- for every object ( if PasteAllorSel.state == 1 then ( -- convert from bit array to array so we can access its indexed values as an array SelectedMods = lbx1.selection as array if SelectedMods.count > 0 then ( for p = 1 to SelectedMods.count do ( indexedmod = SelectedMods[p] if copyOrInst.state == 1 then -- copy ( addmodifier i (copy modsArray465[indexedmod] ) ) Else -- instance ( addmodifier i modsArray465[indexedmod] ) ) ) ) Else ( for v = 1 to modsArray465.count do ( if copyOrInst.state == 1 then -- copy ( addmodifier i (copy modsArray465[v] ) ) Else -- instance ( addmodifier i modsArray465[v] ) ) ) ) ) Else ( MessageBox "Please Get The mods first" ) ) -- end undo "paste mod" on ) -- end on btn3 pressed do )-- end rollout kupo rollout kie "Untitled" ( button btn1 "Button" pos:[2,1] width:151 height:30 on btn1 pressed do ( ----------------------------- if selection.count == 1 then ( createDialog kupo 162 260 TheMods = for mod in selection[1].modifiers collect mod.name -- collect modifiers names into an array kupo.lbx1.items = TheMods --assign the array of names the the listbox items -- we must collect the actual modifiers you were only collecting -- the modifier name above in TheMods -- this does not seem to get the modifiers as a useable array -- modsArray465 = for modGet in selection[1].modifiers ( collect modGet ) -- collect -- this does modsArray465 = $.modifiers -- selection[1].modifers global modsArrayCopy = copy modsArray465 print "modsArray465 =" print modsArray465 -- just for you to see what it looks like in listener window ) --------------------------- else messagebox "pick one object" ) --------------------------- ) createDialog kie 155 50 -- ) -- end macroscript end