I did not know there was a limit it is 64K when compiled. I have lots a scripts that are 2100 lines long and this one is 2560 and fails. It is made up of three parts, can I keep it all one script and divide the big part or do I need to cut the script in two?
Not knowing what the script is doing, is it possible for you to cut this down into reusable functions.
Another suggestion - i got a similar issue at some point earlier (can't remember the error msg)
In a very huge script i was attaching to a form more more than 50 times using -> VBWindow('AttachName').attach (Because is was recorded as such). The script could never complete the execution due to some error.
I created a TVBWindow object corresponding to this window and used my object to attach to the window instead of using VBWindow('AttachName').attach
This resolved my issue. I guess when we use
VBWindow('AttachName') and other TP methods, TP doesn't destroy the TVBWindow object returned by the method until the script stops. And that's probably the reason why replaceing these with a single object got the script working for me (and it executed really fast!)
If you always do what you've always done, you will always get what you've always got!