Create and Edit Scripts
Scripts in Foxel are managed through File > Shared Files > Scripts.
This is where you create new scripts, duplicate existing ones, and open them for editing.
Why This Matters
Before you can run or learn from scripts, you need to know where Foxel keeps them and how the editing workflow works.
Foxel manages scripts inside Shared Files, but the actual editing happens in an external editor.
Where Scripts Are Managed
Scripts are managed through:
File > Shared Files > Scripts
This is the central place where you create, duplicate, and manage saved scripts.
Creating A Script
To create a new script:
- Open File > Shared Files > Scripts.
- Click Create.
- Foxel creates a new empty script.
Use this when you want to start from a blank Lua file.
Duplicating A Script
If you want to reuse part of an existing script instead of starting from scratch, duplicate it first.
To duplicate a script:
- Select the existing script.
- Open its context menu.
- Choose Duplicate.
This is useful when you already have a script that is close to what you need.
Duplicating lets you experiment without changing the original script.
Editing A Script
Foxel does not include a built-in script editor.
To edit a script:
- Open File > Shared Files > Scripts.
- Double-click the script.
Foxel opens it in the default application associated with .lua files on your system.
If you have configured a dedicated script editor in the preferences, Foxel uses that editor instead.
Practical Note
A good free editor for Lua scripts is Notepad++, which supports Lua syntax highlighting.
Any editor that can edit plain .lua files can be used.
Basic Workflow
A simple script editing workflow is:
- Open File > Shared Files > Scripts.
- Create a new script or duplicate an existing one.
- Double-click the script to open it in an external editor.
- Edit and save the
.luafile. - Return to Foxel and run the script when needed.
What To Remember
- Scripts are managed through File > Shared Files > Scripts.
- Create makes a new empty script.
- Duplicate lets you reuse an existing script as a starting point.
- Foxel does not include a built-in script editor.
- Scripts are edited in the default
.luaeditor or your configured script editor. - Duplicating scripts is useful when experimenting.