ScriptSpot

Script

MiniListener Focus

By Swordslayer · Credited author: Vojtech Cada · 2018-09-11

Version
0.01a
Votes
6
Description

Sets keyboard focus to the MiniListener input field. If you want to use it, run the .mcr file once via Scripting -> Run Script or by drag&dropping it to the viewport. It creates an item in the Shortcuts category under Customize UI, which you can then assign a shortcut to.

 

 

Attachments

Tags: macroscript, listener

Comments (4)

.

Haider of Sweden · 2018-09-12

I got this error

No ""get"" function for undefined

I run Max 2016

works in 2017

Martin Breidt · 2018-09-12

FWIW: The oldest version I have is 2017 and there the script works just fine as a hotkey as well as a button.

.

jahman · 2018-09-12

I guess this should work fine in all 2012+ versions


(

	hwnd = (dotNetClass "Autodesk.Max.GlobalInterface").Instance.TheListenerWindow
	windows.sendMessage hwnd 0x0007 0 0 -- WM_SETFOCUS
		
	setListenerSel #(-1,-1)	
	setListenerSelText ""

)

Nice one!

Martin Breidt · 2018-09-11

Five lines of code, and each one is interesting :-)
Nice, thank you