Why does not works the Script with Alt and Ctrl on buttons of Tollbar?

I created a handy script, on job-computer in office it works, but on the home laptop does not work when pick on button with Ctrl and Alt.
Also, when click on these buttons, I can copy and delete buttons, instead of working the Ctrl and Alt. It seems that this is some sort of adjustment.
Please, what's the problem?

3dsMax reset done and even reinstalled - did not help.

macroScript Freeze
Category:"Niklit Scripts" 
Tooltip:"UniFreeze"
icon:#("UVWUnwrapView",17)
(
if selection.count>0 then
	(
	if keyboard.altPressed then (max freeze inv)
	else (max freeze selection)
	)
	else 
		try(
		if keyboard.controlPressed then (max unfreeze by hit) else
		if keyboard.shiftPressed then (max unfreeze by name) else
		max unfreeze all
		)catch()
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Haider of Sweden's picture

.

How is it supposed to work? I tried the latest code by fajar and I could make the following work:

* select object, press toolbutton > selected object frozen
* no object selected, press shift+toolbutton > Unfreeze By Name
* no object selected, press toolbutton > Unfreeze all.

So basically, ctrl and alt doesnt work with me. Is it even supported? I run 2014.

Kind regards
Haider
www.haider.se

fajar's picture

macroScript

macroScript Freezer
Category:"Niklit Scripts" 
Tooltip:"UniFreeze"
icon:#("UVWUnwrapView",17)
(
fn freezeStat=
(
	if selection.count>=1 then
	(
	if keyboard.altPressed then (max freeze inv)else (max freeze selection)
 
	)
	else 
	(
		if keyboard.controlPressed then (max unfreeze by hit) else
		if keyboard.shiftPressed then (max unfreeze by name) else (max unfreeze all)
	)
)	
freezeStat()
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.