Clone option dialog

Hi guys, any way to hide clone option dialog when you copy an object?
Example:
I want to copy one light and everytime is instance. I use shift+move but I don't want to do ok in the dialog everytime. Something to remember instance and hide dialog?
Thanks¡

Comments

Comment viewing options

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

Hi miauu, so great¡¡ Works

Hi miauu, so great¡¡ Works like a charm. I searched before posting but didn't found anything :S

Now I did two buttons. One for start your script, and another one to stop script, but last one doesn't work most of time. Why?

Thanks again for your help

(
	(
		global theTimer
	  	function onTick =
	  	(
	  		try
			(
				child = (windows.getChildHWND 0 "Clone Options" )
				if child != undefined do
				(
					for btn in (windows.getChildrenHWND child[1]) where (btn[5] == "OK") do
					(
						UIAccessor.PressButton btn[1]
					)					
				)
			)
	  		catch()
	  	)
	  	theTimer = dotNetObject "System.Windows.Forms.Timer";
	  	theTimer.interval = 1
	  	dotnet.addEventHandler theTimer "tick" onTick
	  	theTimer.start()  --Stop doesn't work most of time
	  	--theTimer.Stop()
	)
)
miauu's picture

.

I have to see your code. Then I can tell you why it not works.
The scrip to stop the script have to include only

try(theTimer.Stop())catch()

I suggest to change the name of the time to something unique to prevent errors(some other scripts can have global variable with the same name).

vidivini500's picture

Well, is your code, I have 1%

Well, is your code, I have 1% idea of scripting :( I try to put your code line where I think it can be located but doesn't work

Don't worry, at least I have script to not press "ok" everytime
If I need dialog again, re-open max

Some day I will try to learn a little ;)

Thanks

miauu's picture
miauu's picture

.

Search this forum and cgtalk MAxscript and SDK forum. I showed how to do what you want, but don't have time to find the proper thread.

Comment viewing options

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