ScriptSpot

Forum topic · General Scripting

Hiding Statistics panel

By remykonings · 2019-04-12

Description

This command:

actionMan.executeAction 0 "40829"

should hide the statistics panel but it is actually a toggle.

I like to set this to false only but i couldn't find a maxscript command?

Do you have any suggestions so i can turn it off?

Thank you.

Comments (3)

.

remykonings · 2019-04-12

for some reason "actionMan.executeAction 0 "40829"" doesn't work anymore.

"max show statistics toggle" toggles it off and on while i want to have it off.
Your code didn't work for me unfortunatly.

.

miauu · 2019-04-13

It works with one small correction:


(
	local table = for i = 1 to actionMan.numActionTables where (actionMan.getActionTable i).name == "Main UI" do exit with actionMan.getActionTable i
	local checked = for i = 1 to table.numActionItems where (item = table.getActionItem i; item.getMenuText &aiMenuText; aiMenuText == "Show Statistics Toggle") do exit with item.isChecked
 
	if checked do actionMan.executeAction 0 "40829"
)

Swordslayer · 2019-04-12


(
	local table = for i = 1 to actionMan.numActionTables where (actionMan.getActionTable i).name == "Main UI" do exit with actionMan.getActionTable i
	local checked = for i = 1 to tbl.numActionItems where (item = table.getActionItem i; item.getMenuText &aiMenuText; aiMenuText == "Show Statistics Toggle") do exit with item.isChecked

	if checked do actionMan.executeAction 0 "40829"
)