The Quickscript window allows you to enter and run scripts while SE is running. It is a built-in plug-in. If it is not listed in the Toolbox menu, choose the Manage Plug-ins... menu item and check its box in the Active column of the table of plug-ins. Activating the Toolbox item will display the window; then just paste or enter a script and press the Run button to execute it. The Quickscript window is useful for patching settings, batch processing, trying out features and practicing script writing, and for writing and debugging plug-ins.
When you run a script in the Quickscript window, you will be given a valid PluginContext instance much as if the script was running inside a plug-in. This means that you can do most of your testing for new plug-ins interactively, without having to add and remove an external plug-in repeatedly. The main difference is that plug-ins call the run() function when they are activated, and this is where most plug-ins do their actual work. During testing, you can check when you are running in Quickscript (see below) and add a call to run() to simulate plug-in activation. This technique is used by many of the examples in the JavaScript example folder.
The variable sourcefile contains the name of the active script file. A script that is running in the Quickscript window uses the special file name "Quickscript". Hence, you can alter the behaviour of a script when it is run in the Quickscript window using:
if( scriptfile == "Quickscript" ) { // do something when running in Quickscript } else { // do something else when not running in Quickscript }
The SE Text Resource Editor is a more powerful version of the same editing engine used in the Quickscript window. It allows you to open and save scripts, have multiple open files, has find and replace tools, and includes special features for editing SE files. In addition to JavaScript source, it can be used to edit SE text resources (*.properties, *.txt, *.utf8), Java source files (*.java) and HTML files (*.html). It also has a number of built-in template files that you can use to get you started when creating new scripts. The SE Text Resource Editor is a separate application from SE, but you can link the two together using the Editor Integration plug-in available from the SE plug-ins page. When the editor is linked to SE using the plug-in, you can run the script being edited in the editor with the press of a button, much as you can with the Quickscript window, but you also have all of the advantages of using a full-blown text editor.
It is possible for plug-ins to interact with the Quickscript window by reading or editing the current script, running or debugging it, or even adding new commands to the editor. See the Q&A page for an example.