I am trying to come up with a system to organize all the JSL scripts attached to my data table. I want to insert a header in the comments at the top of each of my scripts. It will look like this:
/* ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * **
* Script Name: my script name
* Script Category: <<category>>
* Author: author name
* Rev Date: date
* Purpose: purpose
* * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * */
Inside of this header I will keep some metadata about each of the scripts. For example, the "script category" field which is enclosed in angle brackets. I want to be able to iterate over the scripts and manipulate them based on this metadata.
I know that I can obtain a list of all the scripts attached to my data table like this:
dt = Current Data Table();
scriptList = dt << Get Table Script Names;
And then I can get the contents of a script like this:
scriptText = Char(dt << Get Table Property(scriptList[1]));
However, the scriptText does not contain any of the comments. The header section is missing, so I can't access the metadata contained within those comments.
Is there a way to get the full text of a table script, including comments?