====== The Scripts Menu ======
The '//Scripts//' menu, shown below, allows you to run, edit or otherwise manage the scripts installed with L3DT. The options are discussed below.
{{ l3dt:userguide:scripts:menu:scriptmenu.png |The script menu.}}
===== Script manager =====
The '//Script manager//' menu item opens the [[l3dt:userguide:scripts:manager|script manager window]], which allows you to create, load, edit, remove and sort scripts.
===== New script =====
To create a new script, select the '//New script//' menu item. This will open L3DT's default [[l3dt:userguide:scripts:editor|script editor window]], from which you can write, run and save your new script.
You can also create new scripts using the [[l3dt:userguide:scripts:manager|script manager]].
===== Edit script =====
To edit a script, select the '//Edit script//' menu item. This will open the //select script to edit// window, shown below.
{{ :l3dt:userguide:dialogs:selectscripttoedit.png |:l3dt:userguide:dialogs:selectscripttoedit.png}}
In this window, select the script you wish to edit, and press //OK//. This will open your preferred script editor (as set by the '//Set preferred editor//' option, discussed below), of if you have not set a preferred editor, it will open the script in L3DT's default [[l3dt:userguide:scripts:editor|script editor window]].
===== Set preferred editor =====
If you would prefer to use an external text editor program to edit your scripts, rather than the default [[l3dt:userguide:scripts:editor|script editor window]], you can set your preferred editor using the '//Set preferred editor//' menu option. This will open a file-open dialog box, such as that shown below, in which you may select the text editor application executable.
{{ :l3dt:userguide:scripts:menu:setpreferrededitor.png |:l3dt:userguide:scripts:menu:setpreferrededitor.png}}
After setting your preference, whenever you use the '//Edit script//' option in the script menu, or the 'Edit' button in the [[l3dt:userguide:scripts:manager|script manager window]], L3DT will call your preferred application to open and edit the script file.
To revert to using L3DT's default script editor, select the '//Set preferred editor//' menu option, then click 'cancel' in the file open dialog, and when asked 'Clear filename?', click 'yes'.
===== Script 'quick run' list =====
The script 'quick run' list, highlighted below, lists the scripts installed with L3DT. To run any of the scripts, simply select them from the list.
{{ :l3dt:userguide:scripts:menu:scriptquickrunlist.png |:l3dt:userguide:scripts:menu:scriptquickrunlist.png}}
The list will only include the first 10 scripts listed in the [[l3dt:userguide:scripts:manager|script manager window]]; if more scripts are installed, you will be able to run them using a 'More scripts...' menu item that will appear at the bottom of the quick run list.
The 'Up' and 'Dn' (down) buttons in the [[l3dt:userguide:scripts:manager|script manager window]] can be used to sort useful scripts to the top of the list, and less useful scripts to the bottom.