Page 1 of 1
Closing of a specific AHK script (can get it to work in AHK 1.1.37.01)
Posted: Apr 17th, ’24, 10:51
by Oblomov
I've got this inside of an AHK script:
Code: Select all
fullScriptPath = C:\Users\David\Dropbox\Scripts\AHK scripts\SomeText\Sometext.ahk
DetectHiddenWindows, On
WinClose, %fullScriptPath% ahk_class AutoHotkey
Which works inside of an AHK script 1 (with which it closes AHK script 2, basically some other one, currently open). However,
I just can't seem to get this to work inside of FK... would really appreciate some help with this.
P.S. Using FK 4.29
Re: Closing of a specific AHK script (can get it to work in AHK 1.1.37.01)
Posted: Apr 19th, ’24, 20:35
by Marko
Use WinClose by specifying the window title instead:
Re: Closing of a specific AHK script (can get it to work in AHK 1.1.37.01)
Posted: Apr 19th, ’24, 21:08
by Oblomov
Marko wrote: ↑Apr 19th, ’24, 20:35
Use WinClose by specifying the window title instead:
Thanks for the comment Marko! I've just tried this with a script on my end called 'Test.ahk', but unfortunately 'WinClose' didn't terminate it...
Re: Closing of a specific AHK script (can get it to work in AHK 1.1.37.01)
Posted: Jan 4th, ’25, 09:39
by Oblomov
Marko wrote: ↑Apr 19th, ’24, 20:35
Use WinClose by specifying the window title instead:
Still wondering about how I'm to actually do it in FK tbh.



Re: Closing of a specific AHK script (can get it to work in AHK 1.1.37.01)
Posted: Jan 6th, ’25, 18:00
by Marko
How about this?
Code: Select all
name:="test.ahk"
DetectHiddenWindows On
SetTitleMatchMode RegEx
IfWinExist, i)%Name%.* ahk_class AutoHotkey
{
WinClose
WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2
}
Re: Closing of a specific AHK script (can get it to work in AHK 1.1.37.01)
Posted: Jan 9th, ’25, 16:41
by Oblomov
Marko wrote: ↑Jan 6th, ’25, 18:00
How about this?
Code: Select all
name:="test.ahk"
DetectHiddenWindows On
SetTitleMatchMode RegEx
IfWinExist, i)%Name%.* ahk_class AutoHotkey
{
WinClose
WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2
}
Thanks for the input Marko! Unfortunately it didn't work still... Happy NY btw.