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

Selecting a Window Based on Image #5

Closed
ThunderSniper opened this Issue Sep 28, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@ThunderSniper

ThunderSniper commented Sep 28, 2016

Is the above possible? If I have two windows open both named "CRAZY WINDOW NAME" one being a program/executable and another being "explorer", is it possible to just target the explorer window and leave the program/executable alone?

@ritchielawrence

This comment has been minimized.

Show comment
Hide comment
@ritchielawrence

ritchielawrence Sep 28, 2016

Owner

You can filter Cmdow's output with FINDSTR and a regular expression:-

for /f %%a in ('cmdow /b ^| findstr "explorer.*CRAZY WINDOW NAME"') do (
  cmdow %%a /act
)

Note the pipe character (|) has been 'escaped' using a carat (^). Adjust the options in the second use of Cmdow to suit your requirements.

Owner

ritchielawrence commented Sep 28, 2016

You can filter Cmdow's output with FINDSTR and a regular expression:-

for /f %%a in ('cmdow /b ^| findstr "explorer.*CRAZY WINDOW NAME"') do (
  cmdow %%a /act
)

Note the pipe character (|) has been 'escaped' using a carat (^). Adjust the options in the second use of Cmdow to suit your requirements.

@ritchielawrence ritchielawrence self-assigned this Sep 28, 2016

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