Need help to write selection script

Hello dear colleagues.

In work on the project I need to do the script. I have no experience in scripting , so appealing for help to you.

This script will perform the action (show text on screen like «You select sample object») when you select the objects whose name contains the text, such as "sample" (sample1, sample2…)If you select an object that does not contain the text, then nothing happens

It is important that this script is run automatically when you start 3dsmax, and did not need to push the button for it to work.

I hope very much for your help. Thank you.