I'm wondering where's a good place to start for this problem. I believe it might be achieved using apple script but admittedly I don't know its capabilities.
Scenario: I have a NAS which I log in to using Finder. Once logged in there are two folders on the NAS, when I click one of the folders "SNAS" it mounts it on root (i.e., if I CMD+UP ARROW to the top, it's listed next to other drives). I then drag it into my favourites list.
When the Mac is rebooted the connection and favourite is lost and I have to repeat the process.
I want a script to run automatically on each boot, and then periodically (say, every 30 seconds or so). The script should check if the NAS is logged in, if not, log in to it. Check if the folder/drive is mounted, if not, mount it. Then check if it's on the list of favourites, and if not, favourite it.
In effect automatically logging in, mounting, and favouriting the NAS folder/drive each time.
Happy to do the leg work on the script but if anyone has a suggestion for where to start/language to use/or even possibly a dedicated application that would be great as I can't find anything for the niche request on searches
I've attached a run of images showing the current steps being taken.
OS details: macOS Sierra 10.12.1 (16B2555)