Notifications
Clear all

[Closed] Possible to store MaxScript in a .MAX file?

because every instance of the ‘example’ CA fires this message on load. That means you have more than one instance.
you can check it:

rootnode.custattributes

Sorry, I am using this computer remotely in a small screen and accidentally deleted previous post.
Contents might still be available but I am not sure how to unflag deleted post.

I am still not able to make the script to run automatically when scene opens.

@bontempos The code snippet was showing 1. How to store maxscript in a file. 2. How to load the script to be ready to run by typing a command. If you want it to just run when a file loads you can do the following.

exampleCA = attributes example
(
	fn popupFn = messageBox "Hey man!
"

	on load do popupFn()
)

custAttributes.add rootNode exampleCA
Page 2 / 2