Could not close the previous instance of this script. Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
User avatar
SL5
Posts: 584
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Could not close the previous instance of this script.  Topic is solved

15 Feb 2018, 06:36

"temp.ahk: Could not close the previous instance of this script. Keep waiting?"

temp.ahk is a dynamically created and saved ahk-script.

ugly workaround. but seems working:

Code: Select all

DetectHiddenWindows,On
SetTitleMatchMode,1
winTC := sayHelloFunctionInc . " ahk_class AutoHotkey"
if(winexist(winTC)){
	WinClose,% winTC
	WinWaitClose,% winTC,,1
}
if(winexist(winTC)){
	ToolTip, '%winTC%' already exist. cant RUN it `n (line:%A_LineNumber%) `n 
	return false
}
....
run, sayHelloFunctionInc 

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], DRocks, Google [Bot], TAC109, zack0 and 178 guests