The following functions will give you information about a script:
script_exists(ind)
Returns whether a script with the given index exists. script_get_name(ind)
Returns the name of the script with the given index. script_get_text(ind)
Returns the text string of the script with the given index.