>>local sEscape, sOnEscape >>private Escaped >>Escaped = FALSE >>sEscape = Set('Escape') >>sOnEscape = On('Escape') >>on escape escaped = TRUE >>set escape On >> >>&& long process loop, may be a call to any function or procedure, which cleans up the animation >> >>if( Escaped ) >> && interrupted >>endif >> >> >>on escape &sOnEscape >>set escape &sEscape >>>
local sEscape, sOnEscape private Escaped Escaped = FALSE sEscape = Set('Escape') sOnEscape = On('Escape') on escape escaped = TRUE set escape On =LongProcedure() if( Escaped ) && interrupted endif on escape &sOnEscape set escape &sEscape
proc longprocedure() local obj obj = CreateObject( .... whatever ) =obj.Process(.....) && if you get here it's either finished or escaped && obj will be released since it is a local && the only thing left is to close excel or animation class && maybe obj.Release() or obj.Quit endprocCan you be a bit more specific ?