Sign in to follow this  
Followers 0

MWS - My Window Stash [Updated 2011-Oct-30]


11 posts in this topic

Posted (edited)

MWS - My Window Stash

Posted Image

Current Version: v1.0 (2011-Oct-30)

MWS is a free program to stash away the Windows on your desktop. With MWS you can set any program Window as hidden, while the program itself will run silently in the background. Additionally all the Hotkeys used can be customized to your needs.

[*] With MWS you can improve your “Visual Privacy”. No-one looking at your desktop will see instantly what programs you’re running anymore.

[*] You can hide away programs which have long processing runs, cluttering your desktop and impairing the overall usability.

[*] MWS is fully portable, the settings are stored in a "mws.ini" file created in the scriptdir.

It works fine on my Win7-64bit machine. If you find bugs please let me know.

The source and executable can be downloaded from my site: http://www.funk.eu

Kudos to Ascend4nt, Prog@ndy, UEZ & Yashied for parts of the code.

Please let me know if you found some piece of code in the source for which I forgot to mention a credit.

Enjoy, let me know what you think of MWS and with Best Regards

Edited by KaFu
JScript likes this

Share this post


Link to post
Share on other sites



Posted

Wow, very good! Thanks for sharing...

João Carlos.

Share this post


Link to post
Share on other sites

Posted

Seems to work well on XP SP3.

Tried java soft window successfully.

Thanks.

Share this post


Link to post
Share on other sites

Posted

Seems to work well on XP SP3. Tried java soft window successfully.

Good to know (I didn't test it on XP at all :D), thanks for the feedback!

Share this post


Link to post
Share on other sites

Posted

Seems to work fine on Vista also. Thanks for sharing.

Share this post


Link to post
Share on other sites

Posted

As an added value... debug or whatever, maybe you could add the ability to view other hidden windows.

...

$var = WinList()
For $i = 1 to $var[0][0]
  ; Only display non visble windows that have a title
  If $var[$i][0] <> "" AND NotVisible($var[$i][1]) Then
    MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1])
 WinSetState($var[$i][0], "", @SW_SHOW)
  EndIf
Next
Func NotVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then
    Return 0
  Else
    Return 1
  EndIf
EndFunc

8)

Share this post


Link to post
Share on other sites

Posted (edited)

Nice idea KaFu. Thanks.

A more consolidated example of getting the icon from the window handle using the examples from the forum. :D

 

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7

#include <GUIConstantsEx.au3>
#include <GUIImageList.au3>
#include <GUIListView.au3>
#include <WinAPI.au3>
#include <WinAPIProc.au3>
#include <WinAPIShellEx.au3>
#include <WinAPIShPath.au3>
#include <WinAPISys.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
	Local $hGUI = GUICreate('GUI - Window Handle Icons', 400, 400, 300, 220)
	Local $iListView = GUICtrlCreateListView('', 10, 10, 380, 380)
	Local $hListView = GUICtrlGetHandle($iListView)

	_GUICtrlListView_AddColumn($hListView, 'Window Handle Icons', 200)

	Local $hImageList = _GUIImageList_Create(32, 32, 5, 1)
	_GUICtrlListView_SetImageList($hListView, $hImageList, 1)

	Local $aArray = _WinAPI_EnumWindows()
	For $i = 1 To $aArray[0][0]
		_GUICtrlListView_AddItem($hListView, _WinAPI_PathStripPath(_WinAPI_GetWindowFileName($aArray[$i][0])), $i - 1)
		_GUIImageList_SetIconFromHandle($aArray[$i][0], $hImageList, -1, 1)
	Next

	GUISetState(@SW_SHOW, $hGUI)

	While 1
		Switch GUIGetMsg()
			Case $GUI_EVENT_CLOSE
				ExitLoop

		EndSwitch
	WEnd

	_GUIImageList_Destroy($hImageList)
	GUIDelete($hGUI)
EndFunc   ;==>Example

Func _GUIImageList_SetIconFromHandle($hWnd, $hImageList, $iIndex = -1, $iLargeIcon = 0) ; From: <a href='http://www.autoitscript.com/forum/topic/40762-how-to-use-icon-handles-in-listviews-not-possible/' class='bbc_url' title=''>http://www.autoitscript.com/forum/topic/40762-how-to-use-icon-handles-in-listviews-not-possible/</a>
	$hWnd = HWnd($hWnd)
	Local $hIcon = _SendMessage($hWnd, $WM_GETICON, $iLargeIcon)
	If Not $hIcon Then
		Local $iIcon = 0
		If $iLargeIcon Then
			$iIcon = $GCL_HICON
		Else
			$iIcon = $GCL_HICONSM
		EndIf
		$hIcon = _WinAPI_GetClassLongEx($hWnd, $iIcon)

		If Not $hIcon Then
			If $iLargeIcon Then
				$iIcon = $SHGFI_LARGEICON
			Else
				$iIcon = $SHGFI_SMALLICON
			EndIf
			Local $tSHFILEINFO = DllStructCreate($tagSHFILEINFO)
			_WinAPI_ShellGetFileInfo(_WinAPI_GetWindowFileName($hWnd), BitOR($SHGFI_ICON, $iIcon), 0, $tSHFILEINFO)
			$hIcon = DllStructGetData($tSHFILEINFO, 'hIcon')
		EndIf
	EndIf

	$iIndex = _GUIImageList_ReplaceIcon($hImageList, $iIndex, $hIcon)
	_GUICtrlListView_SetItemImage($hWnd, $iIndex, _GUIImageList_GetImageCount($hImageList) - 1)
	_WinAPI_DestroyIcon($hIcon)
	Return $iIndex
EndFunc   ;==>_GUIImageList_SetIconFromHandle
Edited by guinness

Share this post


Link to post
Share on other sites

Posted

Thanks for the feedback :oops:. Hmmm, but truth to be told your functions seems to be nearly the same as the ones I've already used, just that mine are copies of custom functions whereas you rely on Yashied's WinApiEx UDF. I'll give it a shoot and see which one's faster. But stay tuned for the next release :D, I've been considering Valuater's comment and this is what it's gonna look like (if I manage to get it stable and consistent in behavior... and also add some more speed tweaks)...

Posted Image

Share this post


Link to post
Share on other sites

Posted

No they're the same of course but I thought you're using WinAPIEx so why not replace the DLL calls etc..the new UI looks interesting.

Share this post


Link to post
Share on other sites

Posted

Thanks for sharing!

Share this post


Link to post
Share on other sites

Posted

Deprecated, take a look at instead.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0