dragonfly
dragonfly copied to clipboard
add optional target specifiers to BringApp
This adds two keyword arguments to BringApp
, target
and title
.
target
allows specifying an alternate executable to use when determining which window to bring to the foreground. This is useful in the case of programs which must be initiated by a separate launcher program. An example of this Emacs.
BringApp(r"C:\emacs\bin\runemacs", target="emacs")
title
allows refining which windows are brought to the foreground based on matching a substring of a window title. Keeping an unsaved "scratchpad" open in notepad would be an example of this.
BringApp(r"notepad.exe", title="untitled")