it may be useful for you to go see the police. I don't think you can make an official complaint but they may just make a record of your visit so having something down officially?
you are right, a diary/record of what he does is a very good idea, dates, times and a brief outline of what was said. for texts, get her to transcribe the text message onto paper straightaway, refer to the text in her record/diary and keep the text on her phone too. texts on phones are rarely viewed as evidence in courts but a transcript backed up by the actual text is good and in family law is often admissable.
in the meantime have a look at these;
www.scottishlaw.org.uk/lawscotland/fam.html
childpolicyinfo.childreninscotland.org.uk/index/news-app/story.2418
www.sweetandmaxwell.co.uk/Catalogue/ProductDetail.aspx?prodid=5845
www.scotland.gov.uk/library/documents-w8/isfl-06.htm
www.familymediationscotland.org.uk/
www.parentingacrossscotland.org/en/resources/211,Family_Mediation_Scotland.htm
www.opsi.gov.uk/ACTS/acts1995/ukpga_19950006_en_1
www.spig.clara.net/mediatn/scotland.htm
www.calmscotland.co.uk/