Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Differences between minimize and minimizeall


  • Please log in to reply
4 replies to this topic
Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004
Does anyone know the difference between these two.

I have basic code already which will minimize all windows except any on my second monitor. However minimizing them one by one is slow.
If I use minimizeall its pretty much instant.

So I want to combine the two and create and instant minimize for one monitor.

If you make any enhancements, please comment to say what, and why so i can learn for future.

Anyway here is my basic code:

SetWinDelay,-1
restcount:=0
#d::
min:=0
WinGet, id, list,,, Program Manager
Loop, %id%
	{
	WinGetpos,id_x_%A_Index%,id_y_%A_Index%,,,% "ahk_id" id%A_Index%
	WinGet, ExStyle%A_Index%, ExStyle,% "ahk_id" id%A_Index%
	if (id_x_%A_Index% < A_ScreenWidth and id_x_%A_Index% > -1000) and not (ExStyle%a_index% & 0x8) and not (ExStyle%a_index% & 0x8000000) and not (ExStyle%a_index% & 0x80)
		{
		
		min:=1
		break
		}
	}
if min
	{
	restcount++
	Loop, %id%
		{
		WinGetpos,id_x_%A_Index%,id_y_%A_Index%,,,% "ahk_id" id%A_Index%
		WinGet, ExStyle%A_Index%, ExStyle,% "ahk_id" id%A_Index%
		if (id_x_%A_Index% < A_ScreenWidth and id_x_%A_Index% > -1000) and not (ExStyle%a_index% & 0x8) and not (ExStyle%a_index% & 0x8000000) and not (ExStyle%a_index% & 0x80)
			{
			groupadd restore%restcount%,% "ahk_id" id%A_Index%		
			}
		}
	winminimize,ahk_group restore%restcount% ; 0x112 = WM_SYSCOMMAND, 0xF020 = SC_MINIMIZE 
	}
else if restcount
	winrestore ahk_group restore%restcount%
return

Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle

System Monitor
  • Members
  • 508 posts
  • Last active: Mar 26 2012 05:13 AM
  • Joined: 09 Mar 2007
I dont get the code :( but you could minimize all of the windows then maximize the window that you want? not sure if that helped

Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
To minimize the current Window, try Alt+Space followed by the appropriate letter [sorry, my OS is in French].
Normand Lamoureux

Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004

I dont get the code :( but you could minimize all of the windows then maximize the window that you want? not sure if that helped


I had thought of that but i thought it would look untidy.

I can also set the right hand window to always on top, which will stop windows minimizing it. But I have several windows that i Flick between on the Second monitor. So would have to keep toggling it on and off.

I have posted up to date code on the scripts and functions that is more efficient than this version.
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle

leecher
  • Guests
  • Last active:
  • Joined: --
Hi,

Just stumbled across your post, as I had the same problem.
As I did't find a solution, I did it mayself. When writing the code, I found out the following:
You have to use SetWindowPLacement-API if you want to minimize the windows without the minimize-Animation.
See my example-Sourcecode here:
http://code.dump.at/...dump/minimize.c
(Compiled version available at http://dose.0wnz.at/...p/minimizer.zip )
Kind regards.