You don't give a name*, but anyway, if you go to the search page online catalogue of the National Records of Scotland (
https://catalogue.nrscotland.gov.uk/nrsonlinecatalogue/search.aspx) and enter
put to the horn and select
Phrase as the search term and dates 1841 to 1841 you will get a list of 43 records where that phrase appears in the trial papers relating to numerous people. Clicking on the Reference brings up a description of the crime of which the person was accused and a statement of the verdict. (You can, of course, also start your search by using the person's name!)
To view the records you can visit the Search Rooms at NRS or you can order a copy of the document or find a researcher who would be willing to visit the search rooms and make a copy for you. (That is a service offered by Scottish Indexes (
https://www.scottishindexes.com/research.aspx). I used their services some years ago to look up and provide copies of some legal records. I was extremely impressed with the service. They are experts in dealing with historical legal records. They are very helpful,
*If the person you are looking for is James Welsh, he was one of the names that came up in that search - James Welsh, tried at the High Court Stirling, 13 April 1841. Crime of assault by discharging loaded firearms.