Save the script file into a file store. When you edit the file you will see a button at the top which you can click to run the file using the selected script engine. A popup dialog will appear and ...
This repository contains examples of how to use the polkadot{.js} API to connect to a node and perform some basic operations. These commands will run a TypeScript script directly using tsx.