Unless your flight is late afternoon or early evening you need to go the previous day-
There are three trains a day (all change at Glasgow Queen Street, then at Haymarket into the tram or bus to the Airport)-
Fort William d 0744, 1140 and 1737 Haymarket a 1230, 1631 and 2231 respectively.
Add 30 minutes for the tram or bus
There are a number of coaches a day, change at Glasgow Buchanan Bus Station, then direct to the Airport-
Fort William d 0910, 1110, 1310, 1410, 1510, 1740, 1910 Edinburgh Airport a 1416, 1616, 1716, 1913, 2043, 2243 and 0004 respectively.
So after allowing for a 3 hour check in the earliest flight you could make is at 1600 . Given the distance and nature of the roads/potential delays on the trains I would add at least an hour to that= 1700.
Far safer to make a day of the journey the previous day ready and on site to fly out the next day.