Lou,
Can you repalce all "if(hwnd != 0) PostMessageA(hwnd, WM_COMMAND, 0x822c, 0);" with
"if(hwnd != 0) if(PostMessageA(hwnd, WM_COMMAND, 0x822c, 0) == 0) hwnd = 0;" in the version you posted? So we handel the case if someone close the chart, but not the script, more gracefuly. (I don't wan't to polute this tread with more files)
No matter if your version solvs the problem or not, it's a corection that shuold have been like that from v1.1.
Can you repalce all "if(hwnd != 0) PostMessageA(hwnd, WM_COMMAND, 0x822c, 0);" with
"if(hwnd != 0) if(PostMessageA(hwnd, WM_COMMAND, 0x822c, 0) == 0) hwnd = 0;" in the version you posted? So we handel the case if someone close the chart, but not the script, more gracefuly. (I don't wan't to polute this tread with more files)
No matter if your version solvs the problem or not, it's a corection that shuold have been like that from v1.1.