Bah, patching failed :-(. I managed to intercept the script object creation calls, but the number of COM interfaces I'd have to replace (all at runtime with trampolined function calls) is prohibitive. Still, I soldiered on, to find that the script files seem (I could be wrong) to be loaded privately then parsed with IActiveScriptParse::ParseScriptText. I was hoping for IPersistFile::Load - because then I could trap the filename.
It seems that the "10 times" thing is due to scripts sharing functions: if a script called "Banana" has a function called "Peel" then every other script object is passed "Banana" via AddNamedObject() - I'm guessing that the script code is being reparsed and stored. -- <http://forum.pspad.com/read.php?2,40832,40880> PSPad freeware editor http://www.pspad.com
