So basically you could have a 64x64 px picture of some kind of repeating texture and make it tiled throughout the window in order to make a cool background? That seems like the main function from what you said (I don't know any scripting). Am I right in that?
If that is the case, then are you not able to make a background texture for the window by any other means, are you only able to use one 64x64 picture? That seems odd to me considering the window is obviously much larger than that.
I can say only good job for finding the code and making it more efficient. I don't know exactly all that went into this, scripting is still over my head