Notifications
Clear all

[Closed] Interesting challenge for MaxScripter

The code you’ve shown above cannot remain as is. There shouldn’t be any executable content in the MCR file. This is the nature of macroscript files.

 MZ1

Can we set a local variable inside rollout?

yes, we can.

1 Reply
 MZ1
(@mz1)
Joined: 10 months ago

Posts: 0
macroScript TEST_MacroDialog
Category:"TESTS"
buttonText:"MacroDialog"
toolTip:"MacroDialog"
(
	rollout mcrrol "Macro Dialog" width:200
	(
		label lb "This is a test dialog" align:#center
		local visibleflag = false
		on mcrrol close do
		(
			mcrrol.visibleflag = false
			updatetoolbarbuttons()
		)
		on mcrrol open do
		(
			mcrrol.visibleflag = true
		)
	)
	on isChecked do mcrrol.visibleflag
 	on execute do if mcrrol.visibleflag then DestroyDialog mcrrol else CreateDialog mcrrol
)

the code in mcr won’t run while initialize ,so we should put them out

really nice challenge, I like it
no matter what I do I fail miserably

Page 2 / 2