Now watches for process instead of window

Deciding whether or not a tool is already up by a window existing fails
if the tool is started, but hasn’t created a window yet. This is not an
issue if watching for the _process_ to pop up.

Ideally this would also close processes instead of windows when the
watched game goes down, but killing a process from AHK sadly is
ungraceful, unlike closing a window.
This commit is contained in:
alterNERDtive 2022-09-09 18:31:09 +02:00
parent 0e9813fad2
commit 59d63e42b0
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,13 @@
# devel
## Changed
* Now watches for a _process_ instead of a _window_ for checking if a tool is
already up. This means stuff isnt started multiple times if the window takes
a while to pop up.
-----
# v0.2.0 (2021-01-20)
This release adds proper support for devices beyond just Joysticks, e.g.

View file

@ -125,7 +125,8 @@ watchTarget() {
; start tools
for ip, path in config["tools"]["paths"] {
SplitPath, path, file
if (!WinExist("ahk_exe " file)) {
Process, Exist, %file%
if (!ErrorLevel) {
Run, % path
}
}