The method FindCategByName searches the category named CatName. If found it returns the index of the category, else it returns -1. The case is not case sensitive.
Hint:
In order to access the spectral collection currently loaded in the Spectral Collection Editor you can use the pre-declared global variable SCData.