ScriptSpot

Forum topic · General Scripting

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

By Nik · 2014-03-06

Description

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 (2)

.

Haider of Sweden · 2014-03-09

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.

macroScript

fajar · 2014-03-07


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()
)