[Closed] Add custom scripts to SME toolbar
Hi All.
Does somebody know how to add a custom script to the SME? I have bought some scripts before, which directly installs in the SME like DropToSlate for example. Here is a picture for reference:
Simple drag&drop from the Customize User Interface to SME won’t allow me to do that.
Thanks for the help in advance!
Thanks for the reply!
Are you referencing this code:
if not ButtonExists toolbar_hwnd btnText then
(
local mbdata = gi.macrobuttondata.create macro_settings_ID “” “DropToSlate Settings” 0 “DropToSlate”
local toolMacroItem = gi.toolmacroitem.create 24 24 mbdata 31toolbar.AddTool toolMacroItem toolbar.NumItems
local items = windows.getChildrenHWND toolbar_hwnd
UIAccessor.SetWindowText (items[items.count])[1] btnText
)
Do you run this code straight in the MAXScript editor? Running this code will not do anything. Running it for a second time will get this error:
– Error occurred in anonymous codeblock; filename: ; position: 40; line: 1
– Type error: Call needs function or class, got: undefined
– MAXScript callstack:
– thread data: threadID:3396
– [stack level: 0]
– In top-level
Sure, it doesn’t work this way
- get sme window handle
- get sme toolbar window handle
- get macro id
- then use the above example
ps. I can’t post full solution for obvious reasons