The Scotland back into the E.U is just as complicated, if not more, than the UK -
E.U exit.
Firstly Scotland as part of the U.K exits the E.U, assuming it does happen, then is part of the trade negotiations with the E.U and the rest of World, pending the Indy Referendum.
Assuming the referendum goes for Scottish independance, all the ties between the U.K and Scotland have to be separated, the border / border control needs to be sorted.
Scotland have to set up alternatives to anything currently joint with England.
Only when Scotland is truely separate and has proven to the E.U that they can stand alone successfully will the E.U consider an application to join.
That isn't an instant process and if successfull will need all E.U legislation putting in place from both sides
All that in total could easilly be 10 years or more by which time Scotland may have realised being out of the E.U may not be that bad after all.