Script Central - Subroutines Tab

For viewing and editing subroutines and procs.  See also Script Central Tabs.

This tab shows all the text files located in your TP Scripts folder and subfolders, whether or not they are used by the current layout.  If you want to prevent a file in that folder from appearing in this list, rename it to start with underscore, e.g., "_hiddenfile.txt".

Also shown in the list are any procs defined in code which has been processed by the layout.  Usually procs are defined in the master script, and are processed automatically on layout open, so they appear in the list in this tab.

List contents:

ID

Unique program-assigned id for each row.  Starts with S for subroutine, P for proc.

Name

Name of subroutine file or proc.  Subroutine files are in folders under <TP app data dir>\Scripts.

Subfolder Name of subfolder under Scripts directory

First Line

First line of routine.

Actions:

Click list item

Selects routine and displays it in the text window.

Double-click row

For subroutine file: brings up Notepad.  For proc: does nothing; editing must be done in code where proc is defined.

Right-click row Brings up context menu, commands as listed below.

Text window

Text is editable.  Text is in code style: fixed-size font, no wrap.  Changes are saved on clicking OK or Apply or on changing tabs.

Context menu:

Edit in Notepad

Brings up Notepad for editing and viewing selected subroutine; does nothing for procs.

Delete

For subroutine: deletes file, after confirmation.  Not applicable to procs.  Does not work over multiple selected rows, only on right-clicked one

Copy

Copies selected row(s) to Windows Clipboard as tab-delimited text

Select All

Selects all rows for copy

Refresh

Rebuilds list; sometimes needed if changes have been made externally