I was wondering what the easiest most straightforward way of playing a script on an existing canvas would be?

I want to experiment with canvas settings (textures, roughness, scale etc.), then play a script, see what the result is like. Also, I would like to USE scripts primarily in the creative process, to do things on various layers etc. not just to share session recordings with others.

Each time I launch a script is closes my open document and starts a new one, which implies the scripting engine is primarily for sharing and not for use in the creative process. Am I doing something wrong?

Any tips?