Script can do this I doubt very much that this can be done from an action…
I need a script to create a folder called Export - [User Input] on the Desktop...
Save Layer Comp "Background" as a .jpg to that folder,
Select Layer Comp "Header" , Trim Top Left Pixel Color from Left, Right, Top and Bottom, then save that to the Export folder as an optimized .Gif
Then revert to Snapshot 1 (already created in previous action)
If anyone has some time on their hands and can create this script so it can run within Photoshop, that would be great and very much appreciated.