Scripteditor Dialog » History » Version 4
Per Amundsen, 03/27/2021 05:53 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 | 4 | Per Amundsen | on<whitespace><level>:<event>:command, see [[Scripting Events]] for more information. |
20 | 1 | Per Amundsen | |
21 | 3 | Per Amundsen | alias<whitespace><name><whitespace>command |
22 | 2 | Per Amundsen | |
23 | Format when using multiple lines is: |
||
24 | |||
25 | <pre> |
||
26 | 4 | Per Amundsen | on<whitespace><level>:<event>:{ |
27 | 2 | Per Amundsen | /command1 |
28 | /command2 |
||
29 | ... |
||
30 | } |
||
31 | |||
32 | 3 | Per Amundsen | alias<whitespace><name><whitespace>{ |
33 | 2 | Per Amundsen | /command1 |
34 | /command2 |
||
35 | ... |
||
36 | } |
||
37 | </pre> |
||
38 | 1 | Per Amundsen | |
39 | h2. Saving a script to a different ini file |
||
40 | |||
41 | To save the current script file to a different ini file, click the Menubar (inside the editor) -> File -> Save As menu item. |
||
42 | |||
43 | h2. Loading a script from a different ini file |
||
44 | |||
45 | To load a script from a different ini file, click the Menubar (inside the editor) -> File -> Load menu item or use the [[/load]] command. |
||
46 | |||
47 | When loading scripts using the [[/load]], [[/reload]] or [[/unload]] command, the script editor will be automatically updated with the new script. |
||
48 | |||
49 | h2. Search/replace text |
||
50 | |||
51 | Clicking the Menubar (inside the editor) -> Edit -> Find or pressing the %(key)CTRL% + %(key)F% shortcut opens the search and replace panel. |
||
52 | |||
53 | You can search or search and replace using a [[Scripting_Regex|Regular Expression]] by checking the *Regex* checkbox. |
||
54 | |||
55 | Pressing the %(key)ESCAPE% key closes the search panel. |
||
56 | |||
57 | h2. Checking brackets |
||
58 | |||
59 | 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. |
||
60 | |||
61 | h2. Reloading a script file |
||
62 | |||
63 | 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]]. |
||
64 | |||
65 | h2. Jumping to a specific alias in a script |
||
66 | |||
67 | The *Alias* menu item in the Menubar (inside the editor) can be used to jump to a specific alias in the current script file. |
||
68 | |||
69 | h2. Adding TODO items |
||
70 | |||
71 | The *TODO* menu item in the Menubar (inside the editor) allows adding and viewing TODO items in the script. |
||
72 | |||
73 | h2. Ignoring a script |
||
74 | |||
75 | 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. |
||
76 | |||
77 | h2. Font |
||
78 | |||
79 | The font of the editor can be changed by clicking the Menubar (inside the editor) -> File -> Change Font menu item. |
||
80 | |||
81 | _Note: only "truetype":https://en.wikipedia.org/wiki/TrueType fonts can be used._ |
||
82 | |||
83 | h2. Colors |
||
84 | |||
85 | The editor colors can be changed in [[Options Dialog|Options]] -> [[Colors Options|Colors]]. |