pspad: -------------------------------------------------------------------------------- I found, i am able to handle it. But this way how to use scripts is wrong. In your case PSPad never finish script inicialization and it's (at least scripts) behavior can be undetermined.
Anyway, the message won't be shown on exit -------------------------------------------------------------------------------- Hi, I believe, I had some similar problem when I was experimenting with GUIs for scripts some years ago, probably the event loop of these script windows outside of PSPad caused similar problems on closing of PSPad or reloading scripts cf: https://forum.pspad.com/read.php?1,61903,61928#msg-61928 (Czech forum). It seems to me, that some kind of cleanup function "exit" or "onBeforePSPadExit..." as a kind of complement to Init() might help in this context; however, I don't know, if it can be implemented for WSH. I imagine, if such function were defined in the script (it should be only optional), some kind of "exit" message could be sent to it and the cleanup code could be run within the script - such as destroying the GUI window, possibly some other "external" connections etc. It is likely, that this would require some waiting until exit() completes or some timeouts; closing the program can be a bit slower in such cases (like the script init is currently), but it could be taken as the responsibility of the script writer; probably the (most?) "hangs" in such cases can be handled this way (except for errors not handled in the script itself) . Thanks and regards, vbr -- <https://forum.pspad.com/read.php?2,73475,73479> PSPad freeware editor https://www.pspad.com
