Nicola Sturgeon made the pledge as she opened the Teenage Cancer Trust's ninth international conference in Edinburgh.
Salmond Warns Of "Full English Brexit"
Former first minister Alex Salmond has warned that a "full English Brexit'' would harm Scotland's economy and cultural health.
The SNP foreign affairs spokesman also accused Prime Minister Theresa May of using the position of EU citizens as a "human shield'' in negotiations.
He made the comments during a speech to celebrate the Saltire Society's 80th anniversary at the Royal Society of Edinburgh.
He said: "According to the new Foreign Secretary, full English Brexit will be served by early in the new year and will be consumed within two years.
"I think full English Brexit will be extremely bad for Scotland's economic and cultural health.''
He said even allowing "for the appropriate level of buffoonery, and lack of homework'' that ``after 1,000 years of history we face the choice of others severing our relationships with the continent of Europe''.
He added: "I'm certain that Nicola Sturgeon will discharge her responsibility.
"She is the only political figure since the European referendum that has displayed that she has a clear agenda and that is to maintain Scotland's position within the single market place and also to secure the position of her fellow European citizens in Scotland - a position currently being used quite disgracefully by our new Prime Minister as some sort of human shield in terms of bartering and negotiations of people's lives, a totally unacceptable position.''
He said he believed that through negotiation the position of Europeans as citizens could be secured but is ``not confident'' that Scotland will be able to retain its position within the single market, despite saying it is a feasible solution.
The MP for Gordon added: "Reading the smoke signals coming from Westminster over the last few weeks we would have to come to the conclusion that such a flexible, sensible position is unlikely and therefore I'm fully expecting there to be a second referendum on Scottish independence in about two years' time.''
He said it would be of "great interest how important people will regard Scotland's European connections'', saying he hoped people will want them to be ``retained and flourish''.
In a question and answer session following the speech, he said he believed Scottish independence was "a question of timescale not of destination'', saying he disagreed with some of his colleagues in believing that the European issue is of "fundamental significance''.
Former justice secretary Kenny MacAskill warned on Wednesday against a ''headlong rush'' to a second independence referendum, urging First Minister Nicola Sturgeon to instead ''await the optimum time'' for such a ballot.
Mr MacAskill, who stood down from Holyrood in May, said if Scots again voted to stay part of the UK ''glorious defeat would put the dream back catastrophically'' for independence supporters.
Mr Salmond also criticised the BBC, saying it reminds him of "Soviet Russia'' in its approach to targets and that the lack of a Scottish national public service broadcaster had been a ``major cultural and social inhibition of huge proportions''.
He added: "The latest BBC charter which instructs to improve the social cohesion between the nations of the United Kingdom gives me no confidence that that situation is going to improve.''
The 25 year old from Scotland was found dead on Saturday.
Major cities across Britain are becoming home to "hipster hotspots'' - pushing up house prices strongly in places such as Bristol, Manchester and Edinburgh as well as in London - research has found.
The Convention of Scottish Local Authorities (Cosla) has said that any more cuts to local government funding will result in "severe consequences'' for jobs across the country.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred location:
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.