Notifications
Clear all

[Closed] How to change Preference Settings via UIAccessor.SendMessage?

Hi guys,
I want to change Preference Settings by maxscript ,It seemes UIAccessor.SendMessage can handle it but I don’t know how to use,any help?

max file preferences
--switch General to Files
5 Replies
2 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

This is not perfect solution but works


 -- with first line below you can stop the timer after testing
 if notifier != undefined do notifier.stop()
global notifier = dotNetObject "Timer"
notifier.interval = 10000 -- interval 10sec
dotNet.addEventHandler notifier "Tick" \
(
	fn clockTick s e = 
	(	
		if tabbedDialogs.isOpen #preferences do
		(
			--check current "tabPageSpec"
			tabPageSpec = (tabbedDialogs.getCurrentPage #preferences)
			format "PageTitle: %  tabPageSpec: %
" (tabbedDialogs.getPageTitle #preferences tabPageSpec) tabPageSpec
			-- tabPageSpec for "Files tab" is #(62607537,245381968)
			if (tabbedDialogs.getCurrentPage #preferences)[1] != 62607537 do
				tabbedDialogs.setCurrentPage #preferences #(62607537,245381968)
		)
	)
)
notifier.start()
 
(@momo2012)
Joined: 11 months ago

Posts: 0

I just tested,it worked like a charm!!! Too much thanks,I cost almost half day ,now I know how to handle it. :bowdown: :bowdown: :bowdown:

why is 10 secs?

2 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

For testing reason.

(@denist)
Joined: 11 months ago

Posts: 0

a testing reason needs only 9 secs