Jump to content

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


KaFu
 Share

Recommended Posts

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
Link to comment
Share on other sites

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)

NEWHeader1.png

Link to comment
Share on other sites

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

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Thanks for sharing!

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

×
×
  • Create New...