Winget to close windows closes script too

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Winget to close windows closes script too

25 Apr 2017, 20:35

I am trying to close all non active windows that contain Google Drive in its path.
So I found this code that works perfectly but there is one problem... It also closes scripts insideGoogle Drive Folder how can I exclude scripts and exes from it?

Code: Select all

GoogleDriveWatcher:
{
	SetTitleMatchMode, 2
	WinGet, id, list, Google Drive ;find innactive Google Drive Folders and closes it.
	Loop, %id%
	{
		ToolTip
		this_id := id%A_Index%
		WinGetTitle, this_title, ahk_id %this_id%
		IfWinNotActive, %this_title%
		{
		Sleep, 10000
			IfWinNotActive, %this_title%
				{
				winclose, %this_title%
				}
		}
	}
}
return
Is there a good way to use tool tip to inform me that it will be closing in 10...9...8...7...6..5.. unless I activate it again>?

thank You :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 291 guests