ScriptSpot

Forum topic · General Scripting

[request] start and stop pickobject mode

By workszebra_katsu · 2009-07-16

Description

Hi,everyone

I want to make a script,and here is a checkbutton.
I want to control the pickobject mode by this checkbutton.
I can make it pick object on the checkbutton state is true.
But I can't stop the pickobject mode when I didn't pick anything then make the checkbutton state to false.
Who can tell me how to do that,please.

Comments (2)

workszebra_katsu · 2009-07-17

That's cool.

Thank you very much.

Anubis · 2009-07-16

pickbutton is available that is suitable for this case which turns off automatically when Cancel

rollout pick_test "Pick Test"
(
	pickbutton getThis "Pick Object" width:140
	on getThis picked obj do
	( 
		--see if the user did not cancel the picking...
		if obj != undefined do
		(
			--if he did not > CODE HERE
			getThis.text = obj.name
		)
	)--end on
)--end rollout
createDialog pick_test