Could not close the previous instance of this script. Keep waiting?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Could not close the previous instance of this script. Keep waiting?

19 May 2017, 17:42

---------------------------
AutoHotkey.ahk
---------------------------
Could not close the previous instance of this script. Keep waiting?
---------------------------
Yes No
---------------------------
I would like to know everything there is to know about the possible causes for, and ways to avoid, this error. Thank you.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: Could not close the previous instance of this script. Keep waiting?

19 May 2017, 20:24

At least on case i observed: when you try to reload your script but for some reason one of your __delete meta-function is still running preventing the script from this.


[EDIT]: Here's an example: when you try to reload it while a msgbox is still displayed it will ask you if you still want keep waiting:

Code: Select all

Class C {

	static a := []
	
	__New() {
	return this
	}
	add(__x) {
	static __i := 0
	(C.a[++__i] := new C.D()).f := __x.M.bind(__x)
	return this
	}
		free() { ; called from base object			
		C.a := ""
		}
		
			__Delete() {
			MsgBox, 16,, % A_ThisFunc
			}
	
	Class D {
	
			__Delete() {
			MsgBox, 16,, % A_ThisFunc
			}
			
	}
	
}
Class Z {
M() {
return
}
__Delete() {
MsgBox, 16,, % A_ThisFunc
}
}


x := new Z()
(K := new C()).add(x)
			.add(x)
			.add(x)
			.add(x)
			.add(x)
			.add(x)
			.add(x)
			C.free()
			return
my scripts

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, Google [Bot], jomaweb, RussF and 307 guests