Here are the basics...
#target photoshop;
main();
function main(){
//select folder where PSDs are held
var selectFolder = Folder.selectDialog( "Please select folder of PSDs");
//if no folder selected quit.
if(selectFolder == null) return;
//get an array of all PSDs in the folder
var fileList = selectFolder.getFiles("*.psd");
//iterate through file list
for(var a in fileList){
var textColour = new SolidColor();
textColour.rgb.hexValue = "00ff00"; //set colour to green
open(fileList);
activeDocument.activeLayer = activeDocument.artLayers[0]; //Select top layer
if(activeDocument.activeLayer.kind == LayerKind.TEXT){ //check if it is a text layer
activeDocument.activeLayer.textItem.color = textColour; //set text to colour
activeDocument.save(); //Save changes
activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
}else{//not a text layer so close document
activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
}
}//end of filelist
};