<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Script to Minimize Maximise All Open Dialog Windows in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243275#M5440</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Thank you very much.&lt;span class="lia-unicode-emoji" title=":face_blowing_a_kiss:"&gt;😘&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It minimizes the windows but I does not restore back with shift click.&lt;/P&gt;&lt;P&gt;I made a toolbar button and that is fine. It restores back with shift-click.&lt;/P&gt;&lt;P&gt;I am using 3ds max 2020.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI the open dialogs were sme and transform dialog and vfb.&lt;BR /&gt;Is it possible to fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;what can be fixed? I do not understand what the problem is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 07:25:57 GMT</pubDate>
    <dc:creator>denisT.MaxDoctor</dc:creator>
    <dc:date>2021-04-16T07:25:57Z</dc:date>
    <item>
      <title>Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10234027#M5429</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am needing a script to toggle minimise and maximise the existing open windows.&lt;/P&gt;&lt;P&gt;Anybody can help me?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 11:28:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10234027#M5429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-13T11:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10235401#M5430</link>
      <description>&lt;P&gt;3ds Max will be also an open window at the time of execution of the script. Do you want to minize it as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Be carefull:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(
local WM_SYSCOMMAND = 0x112
local SC_MINIMIZE = 0xf020
local SC_MAXIMIZE = 0xf030
local SC_RESTORE = 0xf120

for child in (windows.getChildrenHWND 0) do
(
windows.sendMessage child[1] WM_SYSCOMMAND SC_MINIMIZE 0
)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 18:45:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10235401#M5430</guid>
      <dc:creator>miauuuu</dc:creator>
      <dc:date>2021-04-13T18:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10235998#M5431</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1282940"&gt;@miauuuu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;3ds Max will be also an open window at the time of execution of the script. Do you want to minize it as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Be carefull:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;The idea is correct, but perhaps too aggressive ... since this is not only about dialogues. Maybe this it will be better:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(
	WM_SYSCOMMAND 	= 0x0112
	SC_MINIMIZE 	= 0xF020
	SC_MAXIMIZE 	= 0xF030
	SC_RESTORE 		= 0xF120

	for hwnd in UIAccessor.GetPopupDialogs() do 
        UIAccessor.SendMessage hwnd WM_SYSCOMMAND SC_MINIMIZE 0
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 23:32:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10235998#M5431</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-13T23:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10236642#M5432</link>
      <description>&lt;P&gt;Thank you very much. I don’t want 3ds max screen to be minimised. Only the dialog windows?&lt;/P&gt;&lt;P&gt;can it be like that?&lt;/P&gt;&lt;P&gt;can it work like a toggle to minimise and maximize?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 07:01:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10236642#M5432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T07:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10236647#M5433</link>
      <description>&lt;P&gt;Thank you very much. Today away from my pc but &amp;nbsp;Will check this tomorrow and will let you know about results. Is this like a toggle?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 07:02:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10236647#M5433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T07:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10239733#M5434</link>
      <description>&lt;P&gt;This works great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please help me in 2 more things :&lt;/P&gt;&lt;P&gt;1. Can it be possible to make it work like toggle ? to minimize all open and to maximize all minimised?&lt;/P&gt;&lt;P&gt;2. SME is disregarded when minimising. Is it possible to include that as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 04:51:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10239733#M5434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-15T04:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10239831#M5435</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;This works great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please help me in 2 more things :&lt;/P&gt;&lt;P&gt;1. Can it be possible to make it work like toggle ? to minimize all open and to maximize all minimised?&lt;/P&gt;&lt;P&gt;2. SME is disregarded when minimising. Is it possible to include that as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;SOLVED tag had to go to &lt;STRONG&gt;&lt;A href="https://forums.autodesk.com/t5/3ds-max-programming/script-to-minimize-maximise-all-open-dialog-windows/td-p/10234027#" target="_blank" rel="noopener"&gt;miauuuu&lt;/A&gt;&lt;/STRONG&gt;. His answer is more correct than mine. When we want to MINIMIZE or MAXIMIZE a window, we expect a window with &lt;STRONG&gt;WS_MINIMIZEBOX&lt;/STRONG&gt;&amp;nbsp;or/and&amp;nbsp;&lt;STRONG&gt;WS_MAXIMIZEBOX&amp;nbsp;&lt;/STRONG&gt;styles. In my case, I am giving a POPUP style window list. These windows could be designed for NORMAL placement and they should not be minimized or maximized.&amp;nbsp;So,&amp;nbsp;technically, I was wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to modify miauuuu's code and add a check that window has&amp;nbsp;&lt;STRONG&gt;WS_MINIMIZEBOX&lt;/STRONG&gt;&amp;nbsp;or/and&amp;nbsp;&lt;STRONG&gt;WS_MAXIMIZEBOX&amp;nbsp;&lt;/STRONG&gt;style.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 05:55:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10239831#M5435</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-15T05:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10239857#M5436</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;2. SME is disregarded when minimising. Is it possible to include that as well?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;SME is a &lt;STRONG&gt;WS_OVERLAPPED&lt;/STRONG&gt; window, this is why it doesn't go in Popup Dialogs list&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 05:59:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10239857#M5436</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-15T05:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10240264#M5437</link>
      <description>&lt;P&gt;Thanks for the detailed answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I am dumb at scripting so I can't say I understood.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please show me how to modify miauu's script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the greatest help!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 09:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10240264#M5437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-15T09:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10242427#M5438</link>
      <description>&lt;LI-CODE lang="general"&gt;macroScript MinMaxDialogs 
	category: "DTS" 
	buttonText:"MINMAX"
	toolTip:"Minimize/Restore(SHIFT) Dialogs"
	autoUndoEnabled:off
	silentErrors:off
(
	
	local 
		GWL_STYLE   		= -16,
		WS_MINIMIZEBOX 		= 0x00020000L,
		WS_MAXIMIZEBOX 		= 0x00010000L,
		WS_MINIMIZE        	= 0x20000000L,
		WS_MAXIMIZE       	= 0x01000000L,
		WS_VISIBLE         	= 0x10000000L,
		WS_DISABLED        	= 0x08000000L,
	
		WS_OVERLAPPEDWINDOW = 0x00CF0000L

	local
		GWL_EXSTYLE         = -20,	
		WS_EX_TOOLWINDOW    = 0x00000080L
	
	local 
		WM_SYSCOMMAND		= 0x112,
		SC_MINIMIZE 		= 0xF020,
		SC_MAXIMIZE 		= 0xF030,
		SC_RESTORE			= 0xF120
	
	local MAXHWND = windows.getMAXHWND()
	
	local _USER32 = 
	(
		src="using System;"
		src += "using System.Runtime.InteropServices;"
		src += "class _user32"
		src += "{"
		src += "	[DllImport(\"User32.DLL\", EntryPoint=\"GetWindowLong\")]"
		src += "	public static extern Int32 GetWindowLong(Int32 hWnd, Int32 index);"
		src += "}"
		
		csharpProvider = dotnetobject "Microsoft.CSharp.CSharpCodeProvider"
		compilerParams = dotnetobject "System.CodeDom.Compiler.CompilerParameters"
		
		compilerParams.GenerateInMemory = true
		compilerResults = csharpProvider.CompileAssemblyFromSource compilerParams #(src)
		_user32Assembly = compilerResults.CompiledAssembly
		
		_user32Assembly.CreateInstance "_user32"
	)
	
	fn getStyle hwnd = (_USER32.GetWindowLong hwnd GWL_STYLE)
	fn getExStyle hwnd = (_USER32.GetWindowLong hwnd GWL_EXSTYLE)
	
	fn isVisible hwnd = (bit.and (getstyle hwnd) WS_VISIBLE) != 0
	fn isDialog hwnd = (bit.and (getstyle hwnd) WS_OVERLAPPEDWINDOW) != 0 and (bit.and (getexstyle hwnd) WS_EX_TOOLWINDOW) == 0
	fn isMinimizable hwnd = (bit.and (getstyle hwnd) WS_MINIMIZEBOX) != 0
	fn isMaximizable hwnd = (bit.and (getstyle hwnd) WS_MAXIMIZEBOX) != 0
	
	fn isMinimized hwnd = (bit.and (getstyle hwnd) WS_MINIMIZE) != 0
	fn isMaximized hwnd = (bit.and (getstyle hwnd) WS_MAXIMIZE) != 0
	fn isNormal hwnd = (bit.and (getstyle hwnd) (WS_MINIMIZE + WS_MAXIMIZE)) == 0
		
	mapped fn minimizeWindow hwnd = if not isMinimized hwnd do windows.sendmessage hwnd WM_SYSCOMMAND SC_MINIMIZE 0 
	mapped fn maximizeWindow hwnd = if not isMaximized hwnd do windows.sendmessage hwnd WM_SYSCOMMAND SC_MAXIMIZE 0 
	mapped fn restoreWindow hwnd = if not isNormal hwnd do windows.sendmessage hwnd WM_SYSCOMMAND SC_RESTORE 0 
	
	on execute do 
	(
		shift = keyboard.shiftpressed 
		hwnds = for w in (windows.getchildrenhwnd 0) where (w[2] == MAXHWND or w[6] == MAXHWND) and isDialog w[1] and isVisible w[1] collect w[1] 
		
		(if shift then restoreWindow else minimizeWindow) hwnds
		
		--updateToolbarButtons()
	)
)			&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this macroscript minimizes and restores MAX dialogs.&lt;BR /&gt;with a simple click (or hotkey) it minimizes all visible dialogs, with SHIFT + click (or SHIFT + hotkey) restores the dialogs.&lt;/P&gt;&lt;P&gt;maximizing doesn't make sense for multiple dialogs, so I don't do it for all, but if some dialog has been maximized before, it will be restored to its previuos state.&lt;/P&gt;&lt;P&gt;the script must be saved as an MCR file and placed in one of the MAX macroscripts directories.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 21:23:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10242427#M5438</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-15T21:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243256#M5439</link>
      <description>&lt;P&gt;Thank you very much.&lt;span class="lia-unicode-emoji" title=":face_blowing_a_kiss:"&gt;😘&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It minimizes the windows but I does not restore back with shift click.&lt;/P&gt;&lt;P&gt;I made a toolbar button and that is fine. It restores back with shift-click.&lt;/P&gt;&lt;P&gt;I am using 3ds max 2020.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI the open dialogs were sme and transform dialog and vfb.&lt;BR /&gt;Is it possible to fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 07:20:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243256#M5439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-16T07:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243275#M5440</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Thank you very much.&lt;span class="lia-unicode-emoji" title=":face_blowing_a_kiss:"&gt;😘&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It minimizes the windows but I does not restore back with shift click.&lt;/P&gt;&lt;P&gt;I made a toolbar button and that is fine. It restores back with shift-click.&lt;/P&gt;&lt;P&gt;I am using 3ds max 2020.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI the open dialogs were sme and transform dialog and vfb.&lt;BR /&gt;Is it possible to fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;what can be fixed? I do not understand what the problem is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 07:25:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243275#M5440</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-16T07:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243353#M5441</link>
      <description>&lt;P&gt;Ah... I guess. MAX ignores case for hotkeys.&lt;/P&gt;&lt;P&gt;I changed the code to use SHIFT+ or ALT+ for RESTORE&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In case of using a hotkey you have to assign two hokeys to the macro (with and without ALT). For example, CTRL+M and ALT+M (or CTRL+ALT+M).. or any other key but with ALT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;macroScript MinMaxDialogs 
	category: "DTS" 
	buttonText:"MINMAX"
	toolTip:"Minimize/Restore(SHIFT) Dialogs"
	autoUndoEnabled:off
	silentErrors:off
(
	
	local 
		GWL_STYLE   		= -16,
		WS_MINIMIZEBOX 		= 0x00020000L,
		WS_MAXIMIZEBOX 		= 0x00010000L,
		WS_MINIMIZE        	= 0x20000000L,
		WS_MAXIMIZE       	= 0x01000000L,
		WS_VISIBLE         	= 0x10000000L,
		WS_DISABLED        	= 0x08000000L,
	
		WS_OVERLAPPEDWINDOW = 0x00CF0000L

	local
		GWL_EXSTYLE         = -20,	
		WS_EX_TOOLWINDOW    = 0x00000080L
	
	local 
		WM_SYSCOMMAND		= 0x112,
		SC_MINIMIZE 		= 0xF020,
		SC_MAXIMIZE 		= 0xF030,
		SC_RESTORE			= 0xF120
	
	local MAXHWND = windows.getMAXHWND()
	
	local _USER32 = 
	(
		src="using System;"
		src += "using System.Runtime.InteropServices;"
		src += "class _user32"
		src += "{"
		src += "	[DllImport(\"User32.DLL\", EntryPoint=\"GetWindowLong\")]"
		src += "	public static extern Int32 GetWindowLong(Int32 hWnd, Int32 index);"
		src += "}"
		
		csharpProvider = dotnetobject "Microsoft.CSharp.CSharpCodeProvider"
		compilerParams = dotnetobject "System.CodeDom.Compiler.CompilerParameters"
		
		compilerParams.GenerateInMemory = true
		compilerResults = csharpProvider.CompileAssemblyFromSource compilerParams #(src)
		_user32Assembly = compilerResults.CompiledAssembly
		
		_user32Assembly.CreateInstance "_user32"
	)
	
	fn getStyle hwnd = (_USER32.GetWindowLong hwnd GWL_STYLE)
	fn getExStyle hwnd = (_USER32.GetWindowLong hwnd GWL_EXSTYLE)
	
	fn isVisible hwnd = (bit.and (getstyle hwnd) WS_VISIBLE) != 0
	fn isDialog hwnd = (bit.and (getstyle hwnd) WS_OVERLAPPEDWINDOW) != 0 and (bit.and (getexstyle hwnd) WS_EX_TOOLWINDOW) == 0
	fn isMinimizable hwnd = (bit.and (getstyle hwnd) WS_MINIMIZEBOX) != 0
	fn isMaximizable hwnd = (bit.and (getstyle hwnd) WS_MAXIMIZEBOX) != 0
	
	fn isMinimized hwnd = (bit.and (getstyle hwnd) WS_MINIMIZE) != 0
	fn isMaximized hwnd = (bit.and (getstyle hwnd) WS_MAXIMIZE) != 0
	fn isNormal hwnd = (bit.and (getstyle hwnd) (WS_MINIMIZE + WS_MAXIMIZE)) == 0
		
	mapped fn minimizeWindow hwnd = if not isMinimized hwnd do windows.sendmessage hwnd WM_SYSCOMMAND SC_MINIMIZE 0 
	mapped fn maximizeWindow hwnd = if not isMaximized hwnd do windows.sendmessage hwnd WM_SYSCOMMAND SC_MAXIMIZE 0 
	mapped fn restoreWindow hwnd = if not isNormal hwnd do windows.sendmessage hwnd WM_SYSCOMMAND SC_RESTORE 0 
	
	on execute do 
	(
		alt = keyboard.shiftpressed or keyboard.altpressed
		hwnds = for w in (windows.getchildrenhwnd 0) where (w[2] == MAXHWND or w[6] == MAXHWND) and isDialog w[1] and isVisible w[1] collect w[1] 
		
		(if alt then restoreWindow else minimizeWindow) hwnds
		
		--updateToolbarButtons()
	)
)			&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ALT+ doesn't work for macrobuttons, SHIFT+ doesn't work for hotkeys. This is a built-in limitation&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 07:40:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243353#M5441</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-16T07:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243405#M5442</link>
      <description>&lt;P&gt;Thank you very much. It is working now.&lt;/P&gt;&lt;P&gt;However working with the right ALT key. (which is better for me as I am left handed and holding the stylus on my left and my right hand is free to type)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And thank you for this info about the shift and the alt key for macros.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get into maxscript.&lt;BR /&gt;Do you have any recommendation to start from?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 07:54:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243405#M5442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-16T07:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243491#M5443</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;P&gt;I want to get into maxscript.&lt;BR /&gt;Do you have any recommendation to start from?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You have to find and run a real project, put the MAXScript help as a Bible on your desktop and nightstand, and make friends on one of the popular 3DS MAX forums (AREA, CGTalk, etc.). This is how it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 08:31:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243491#M5443</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-04-16T08:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script to Minimize Maximise All Open Dialog Windows</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243545#M5444</link>
      <description>&lt;P&gt;Thanks a lot. I will keep your advice.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 08:51:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-to-minimize-maximise-all-open-dialog-windows/m-p/10243545#M5444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-16T08:51:50Z</dc:date>
    </item>
  </channel>
</rss>

