New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters #4

Closed
SamHasler opened this Issue Sep 27, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@SamHasler

SamHasler commented Sep 27, 2016

Currently you can only filter by taskbar or window name (Caption). It would be useful to be able to filter by other criteria such as:

  • Image name
  • Window Status
    • Visibility: Visible or Hidden
    • Minimized, Maximized, Restored,
    • Active, Inactive
    • Enabled, Disabled
  • Level - i.e. filter to top level windows.
  • Size
  • Has size (width/height not 0)
  • width / height is =/>/<
  • position?
@ritchielawrence

This comment has been minimized.

Show comment
Hide comment
@ritchielawrence

ritchielawrence Sep 28, 2016

Owner

Hi SamHasler,

This might be implemented. In the meantime, you could use FINDSTR or a FOR loop to filter on everything you suggested. Here's some examples:-

rem filter level 4 windows
cmdow | findstr /r /c:"^[^ ]*[ ]4"

rem filter maximised windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ]Max"

rem filter active window
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ]Act"

rem filter disabled windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ]Dis"

rem filter visible windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^]*[ ]Vis"

rem filter explorer.exe windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^]*[ ][^ ]*[ ]explorer"

rem filter level 4 windows
for /f "tokens=1-8*" %%a in ('cmdow') do (
  if "%%b" EQU "4" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)

rem filter visible level 2 windows
for /f "tokens=1-8*" %%a in ('cmdow') do (
  if "%%b" EQU "2" if "%%g" EQU "Vis" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)

rem filter visible windows wider than 1000
for /f "tokens=1-12*" %%a in ('cmdow /p') do (
  if "%%g" EQU "Vis" if %%j GTR 1000 echo %%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
)
Owner

ritchielawrence commented Sep 28, 2016

Hi SamHasler,

This might be implemented. In the meantime, you could use FINDSTR or a FOR loop to filter on everything you suggested. Here's some examples:-

rem filter level 4 windows
cmdow | findstr /r /c:"^[^ ]*[ ]4"

rem filter maximised windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ]Max"

rem filter active window
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ]Act"

rem filter disabled windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ]Dis"

rem filter visible windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^]*[ ]Vis"

rem filter explorer.exe windows
cmdow | findstr /r /c:"^[^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^ ]*[ ][^]*[ ][^ ]*[ ]explorer"

rem filter level 4 windows
for /f "tokens=1-8*" %%a in ('cmdow') do (
  if "%%b" EQU "4" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)

rem filter visible level 2 windows
for /f "tokens=1-8*" %%a in ('cmdow') do (
  if "%%b" EQU "2" if "%%g" EQU "Vis" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)

rem filter visible windows wider than 1000
for /f "tokens=1-12*" %%a in ('cmdow /p') do (
  if "%%g" EQU "Vis" if %%j GTR 1000 echo %%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
)
@SamHasler

This comment has been minimized.

Show comment
Hide comment
@SamHasler

SamHasler Oct 2, 2016

Wow, thanks for taking the time to write that up!
On Sep 28, 2016 9:07 PM, "Ritchie Lawrence" notifications@github.com
wrote:

Hi SamHasler,

This might be implemented. In the meantime, you could use FINDSTR and a
FOR loop to filter on everything you suggested. Here's some examples:-

rem filter level 4 windows
cmdow | findstr /r /c:"^[^ ][ ]4"
rem filter maximised windows
cmdow | findstr /r /c:"^[^ ]
[ ][^ ][ ][^ ][ ]Max"
rem filter active window
cmdow | findstr /r /c:"^[^ ][ ][^ ][ ][^ ][ ][^ ][ ]Act"
rem filter disabled windows
cmdow | findstr /r /c:"^[^ ][ ][^ ][ ][^ ][ ][^ ][ ][^ ][ ]Dis"
rem filter visible windows
cmdow | findstr /r /c:"^[^ ]
[ ][^ ][ ][^ ][ ][^ ][ ][^ ][ ][^][ ]Vis"
rem filter explorer.exe windows
cmdow | findstr /r /c:"^[^ ]
[ ][^ ][ ][^ ][ ][^ ][ ][^ ][ ][^][ ][^ ][ ]explorer"
rem filter level 4 windowsfor /f "tokens=1-8_" %%a in ('cmdow') do (
if "%%b" EQU "4" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)
rem filter visible level 2 windowsfor /f "tokens=1-8_" %%a in ('cmdow') do (
if "%%b" EQU "2" if "%%g" EQU "Vis" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)
rem filter visible windows wider than 1000for /f "tokens=1-12*" %%a in ('cmdow /p') do (
if "%%g" EQU "Vis" if %%j GTR 1000 echo %%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADUBULGDLZo2Yo-tPsZsFWOjcWOtYL_ks5qusjOgaJpZM4KHh2W
.

SamHasler commented Oct 2, 2016

Wow, thanks for taking the time to write that up!
On Sep 28, 2016 9:07 PM, "Ritchie Lawrence" notifications@github.com
wrote:

Hi SamHasler,

This might be implemented. In the meantime, you could use FINDSTR and a
FOR loop to filter on everything you suggested. Here's some examples:-

rem filter level 4 windows
cmdow | findstr /r /c:"^[^ ][ ]4"
rem filter maximised windows
cmdow | findstr /r /c:"^[^ ]
[ ][^ ][ ][^ ][ ]Max"
rem filter active window
cmdow | findstr /r /c:"^[^ ][ ][^ ][ ][^ ][ ][^ ][ ]Act"
rem filter disabled windows
cmdow | findstr /r /c:"^[^ ][ ][^ ][ ][^ ][ ][^ ][ ][^ ][ ]Dis"
rem filter visible windows
cmdow | findstr /r /c:"^[^ ]
[ ][^ ][ ][^ ][ ][^ ][ ][^ ][ ][^][ ]Vis"
rem filter explorer.exe windows
cmdow | findstr /r /c:"^[^ ]
[ ][^ ][ ][^ ][ ][^ ][ ][^ ][ ][^][ ][^ ][ ]explorer"
rem filter level 4 windowsfor /f "tokens=1-8_" %%a in ('cmdow') do (
if "%%b" EQU "4" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)
rem filter visible level 2 windowsfor /f "tokens=1-8_" %%a in ('cmdow') do (
if "%%b" EQU "2" if "%%g" EQU "Vis" echo %%a %%b %%c %%d %%e %%f %%g %%h %%i
)
rem filter visible windows wider than 1000for /f "tokens=1-12*" %%a in ('cmdow /p') do (
if "%%g" EQU "Vis" if %%j GTR 1000 echo %%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADUBULGDLZo2Yo-tPsZsFWOjcWOtYL_ks5qusjOgaJpZM4KHh2W
.

@SamHasler

This comment has been minimized.

Show comment
Hide comment
@SamHasler

SamHasler Oct 4, 2016

Perhaps you could add these examples to the documentation.

SamHasler commented Oct 4, 2016

Perhaps you could add these examples to the documentation.

@ritchielawrence

This comment has been minimized.

Show comment
Hide comment
Owner

ritchielawrence commented Oct 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment