Editing and Running Scripts
Gliched IDE provides a simple, tabbed interface for editing and running Glich scripts. This section covers the basics of creating, editing, saving, and executing your scripts within the IDE.
Creating and Opening Scripts
- New Script: Click the New button on the toolbar or select File > New (Ctrl+N) to create a new script tab.
- Open Script: Click the Open button or select File > Open... (Ctrl+O) to open an existing
.glcsfile. - Each script opens in its own tab, allowing you to work with multiple scripts at once.
Editing Scripts
- Use the built-in editor to write and modify your Glich scripts.
- Standard editing features are available, including Undo/Redo, Cut, Copy, and Paste (via toolbar buttons or the Edit menu).
- Tabs can be renamed and unsaved changes are indicated in the tab title.
-
Automatic Save: By default, Gliched IDE automatically saves your scripts as you work. This is important because the module system (
file:module) requires scripts to be saved as files in order to be found and used when running or importing modules. - You can toggle autosave in the Tools menu, but it is recommended to keep it enabled for correct module behavior.
Running Scripts
- To run a script, select the tab you want to execute and click the Run button on the toolbar, or select Tools > Run script (F5).
- The output of your script will appear in the Output pane at the bottom of the window.
-
Note: When your script uses the module system (e.g.,
modulestatements), Gliched will look for the required modules as files on disk. Unsaved tabs will not be found as modules. Make sure your scripts are saved before running if they use modules. -
In future versions, it may be possible to run unsaved tabs as
ide:module, but currently only file-based modules are supported. - You can set which tab is the "Run" file by right-clicking a tab and choosing Set as Run File. Only one tab can be set as the run file at a time.
- To clear the run file setting, right-click the tab and choose Clear Run File.
Viewing State
- The Glich State pane (on the left) displays variables, objects, functions, and other state information from your running script.
- This pane updates automatically after each script run.
Tips
- Double-clicking a
.glcsfile (if associated) will open it directly in Gliched IDE. - Use the Help menu to access the Gliched website or About dialog.
- Unsaved changes will prompt you before closing a tab or exiting the IDE (if autosave is off).
For more advanced usage, see the Tutorial section.