Project

General

Profile

Scripteditor Dialog » History » Version 1

Per Amundsen, 03/27/2021 05:50 AM

1 1 Per Amundsen
{{>toc}}
2
3
h1. Script Editor
4
5
!scripteditor.png!
6
7
The script editor allows adding or editing scripts.
8
9
Multiple script files can be loaded at the same time.
10
11
it can be opened by clicking [[Menubar_Control|Menubar]] -> Tools -> Edit Scripts or by pressing the %(key)ALT% + %(key)R% shortcut or by typing [[/edit]] -s.
12
13
The editor shares characteristics with all the other editors.
14
15
_See also [[/load]], [[/reload]], [[/unload]], [[$script]], [[$scripts]], [[Editor Options]]._
16
17
h2. Script formats
18
19
*Event format*
20
21
on *:<event>:commands, see [[Scripting Events]] for more information.
22
23
h2. Saving a script to a different ini file
24
25
To save the current script file to a different ini file, click the Menubar (inside the editor) -> File -> Save As menu item.
26
27
h2. Loading a script from a different ini file
28
29
To load a script from a different ini file, click the Menubar (inside the editor) -> File -> Load menu item or use the [[/load]] command.
30
31
When loading scripts using the [[/load]], [[/reload]] or [[/unload]] command, the script editor will be automatically updated with the new script.
32
33
h2. Search/replace text
34
35
Clicking the Menubar (inside the editor) -> Edit -> Find or pressing the %(key)CTRL% + %(key)F% shortcut opens the search and replace panel.
36
37
You can search or search and replace using a [[Scripting_Regex|Regular Expression]] by checking the *Regex* checkbox.
38
39
Pressing the %(key)ESCAPE% key closes the search panel.
40
41
h2. Checking brackets
42
43
Checking for balanced brackets can be done by clicking the *{}* menu item to the far right of the Menubar (inside the editor) or by pressing the %(key)CTRL% + %(key)H% shortcut.
44
45
h2. Reloading a script file
46
47
If a script file was modified outside of the editor, it can be reloaded by clicking the Menubar (inside the editor) -> File -> Reload menu item or by pressing the %(key)F5% shortcut or by typing [[/reload]].
48
49
h2. Jumping to a specific alias in a script
50
51
The *Alias* menu item in the Menubar (inside the editor) can be used to jump to a specific alias in the current script file.
52
53
h2. Adding TODO items
54
55
The *TODO* menu item in the Menubar (inside the editor) allows adding and viewing TODO items in the script.
56
57
h2. Ignoring a script
58
59
A script file can be ignored (not loaded bu still editable) by right-clicking it in the sidebar list and clicking the *ignore* menu item.
60
61
h2. Font
62
63
The font of the editor can be changed by clicking the Menubar (inside the editor) -> File -> Change Font menu item.
64
65
_Note: only "truetype":https://en.wikipedia.org/wiki/TrueType fonts can be used._
66
67
h2. Colors
68
69
The editor colors can be changed in [[Options Dialog|Options]] -> [[Colors Options|Colors]].