Message 1 of 2
"Pick from object" hotkey script not working anymore (2024)
Not applicable
03-04-2024
09:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! I use this script in 2023 to simulate the "pick material from object" button in SME, but since they've changed SME quite a lot, it's not working anymore and i have no idea how the person managed to make the "windows.Message" work in the first place.
(
if MatEditor.mode == #basic then
(
MatEditor.open() -- force basic medit in to focus, otherwise it won't work
actionMan.executeAction 2 "1101"
)
else
(
if not SME.IsOpen() do SME.Open()
fn GetSMEWindowHandle =
(
max_hwnd = windows.getMAXHWND()
for m in windows.getChildrenHWND 0 where m[4] == "NodeJoeMainWindow" and m[6] == max_hwnd do exit with m[1]
)
local sme_hwnd = GetSMEWindowHandle()
windows.sendMessage sme_hwnd 0x111 41005 0
)
)
The error i get now in 2024 is
"Type error: windows.sendMessage requires Rollout, RolloutFloater or Integer value, got: OK"
From what i've learned, the "NodeJoeMainWindow" is no more. Now it's "Qt5151QWindowIcon" instead, using a simple Window Spy.
Can anybody help? I just need a script that opens SME and pushes the (before) "Pick Material from Object" or (now) "Pick from Object".
Thanks!