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
thank You