Notifications
Clear all

[Closed] How to run part of ms with maxscript?

run MAXScript Listener manual

a=5
5
b=6
6
c=a+b
11
print c
11
11

Same as above with maxscript.how to?

test_array=#("a=5","b=6","c=a+b","print c")
for i=1 to test_array.count do
(
--??-- run them like in MAXScript Listener manually  
--test_array[i] 
)
2 Replies
 lo1

use the ‘execute’ command.

1 Reply
(@momo2012)
Joined: 11 months ago

Posts: 0

Hi lo,tested,works!!!
at first I think execute need use global value(I think “a=5” need a is global),but if test_array is a global value,the items of them are global already I think,whatever,solved.
Too Much Thanks!