If I understand your question properly, it seems perfectly reasonable what is happening.
The form ready event, as the documentation said, initiates after the form design and data are merged, the finished form exists in memory, and the initialize, calculate, and validate events are complete. So, every time you reopen your form a new Form Ready event is launched and the script is executed.
I think that if you want to change this behaviour you have to change the event that executes the script or put more controls in the script first of doing actions (i.e. concatenating the string).
Can you share your form in order to realize if I understand well your question?
Hope this helps,