Or any other commands using the same parameters.
Hello there, a long time autohotkey user here never had to ask for help because of internet Now I have my first question and don't find the answer. I posted in v2 but I think it's related to v1 and 2.
I use the command WinClose, ahk_class xxx ahk_exe xxx to close a specific window. Now I just saw another window getting closed because parameters are the same.
Is there any way to combine ahk_class ahk_exe and window title to only close that one window? Or would it be the only way to use window title without ahk_class ahk_exe?
Thank you all, autohotkey is awesome
Simple question about WinClose Topic is solved
Re: Simple question about WinClose
I exactly did this without readingmikeyww wrote: ↑05 Aug 2023, 03:29Hello,
Answer provided for you here: https://www.autohotkey.com/docs/v2/misc/WinTitle.htm#multi
Code: Select all
WinWait "My File.txt ahk_class Notepad"
Code: Select all
WinClose, "Gesponserte Sitzung ahk_class #32770"
Code: Select all
WinClose, "Gesponserte Sitzung ahk_class #32770 ahk_exe TeamViewer.exe"
Re: Simple question about WinClose Topic is solved
Okay this seems a v1 - v2 issue difference. I just fixed the script to be completely v2 and now it works fine
Edit: I don't really get it, just tried v1 again and also works now. But I tried exactly this line already. Whatever
Code: Select all
WinClose "Gesponserte Sitzung ahk_class #32770 ahk_exe TeamViewer.exe"
Code: Select all
WinClose Gesponserte Sitzung ahk_class #32770 ahk_exe TeamViewer.exe