Maxscript to select radio buttons in the Proboolean Command Panel
I had this code that worked untill 3dsmax 2020, but I can't get it to work now in 3dsmax 2021 (and probablty 2022):
fn priv_proboolean_Extract_pressRadioButton_2018 rbName state = ( local properRb = false local BN_CLICKED = 0 -- clicky message ID local BM_SETCHECK = 241 -- checkbutton toggle message ID local WM_COMMAND = 273 -- windows command message local panelName = if((maxVersion())[1] >= 19000) then "MaxSDK::QMaxTabWidgetClassWindow" else "ModifyTask" --QWidget instead of "ModifyTask" max modify mode for child in (windows.getChildrenHWND #max) where child[5] == "CommandPanelWindow" do ( for classN in (windows.getChildrenHWND child[1]) where (classN[5] == panelName) do ( for btn in (windows.getChildrenHWND classN[1]) do ( if btn[5] == "Extract Selected" do properRb = true if properRb == true and (btn[5] == rbName) do ( local parent = UIAccessor.getParentWindow btn[1] local id = UIAccessor.getWindowResourceID btn[1] windows.sendMessage btn[1] BM_SETCHECK (if state then 1 else 0) 0 If state then windows.sendMessage parent WM_COMMAND ((bit.shift BN_CLICKED 16) + id) btn[1] if((maxVersion())[1] >= 19000) then return OK ))))),
Comments
Thanks, thats great! How do I
Thanks, that's great! How do I know the ID of all the other radio buttons beside the extract operation remove copy instance? Like the radio buttons in Pick boolean type, Operation type, Display type, and the pick boolean? Could you please make it work for all the radio buttons in the Proboolean menu?
I do not know anything about this code myself, I just used code I got as a request for this same problem a few years ago. My 3dsmax scripting knowledge is not near the level I would need to understand this code. I can write clean Maxscript functions, but not these types of windows interactions.
Use the hwnd viewer, it also shows the resource ID.
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
Can't download/find the HWND script
Thanks!
Why so complicated, send a click to it, that should always work:
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters