[solved] Close process when Window Title detected

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
robhayes
Posts: 19
Joined: 28 Dec 2015, 15:35

[solved] Close process when Window Title detected

02 Jan 2016, 13:32

Hello,

I am trying to have my script close YoutubeDLG upon complete.

Code: Select all

^PgDn::
run, C:\Program Files (x86)\YoutubeDLG\youtube-dl-gui.exe
Sleep 1500
Send, ^v
Sleep 100
Send, %A_Tab%
Send, {Enter}
; NEED LINE HERE TO DETECT WINDOW TITLE 'Info' (http://i.imgur.com/BA7Inoy.jpg)
process close, youtube-dl-gui.exe ; only if Window Title 'Info' Detected
return
Thank you in advance.
Last edited by robhayes on 02 Jan 2016, 13:49, edited 1 time in total.
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Close process when Window Title detected

02 Jan 2016, 13:47

Code: Select all

---
Send, {Enter}
;WinWait, WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText
WinWait, Info ahk_class #32770, OK
process close, youtube-dl-gui.exe ; only if Window Title 'Info' Detected
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, Google [Bot], Joey5, Rohwedder and 327 guests