How can messages be scripted whenever I open a specific application? Say I want to start Safari on my Mac. Can I create a pop up message that reads, "Use Chrome instead" or some other thing?

I presume it may be possible with Applescript or something, but don't know where to start on teaching myself how to do this.
Run EDITOR=nano crontab -e and add a line like this:

* * * * * pgrep -xq Safari &amp;&amp; terminal-notifier -title 'Click to quit Safari and open Chrome' -message '' -group cronsafari -activate com.google.Chrome -execute 'osascript -e "quit app \"Safari\""' &gt; /dev/null

The command is run about once per minute, and the notifications are shown repeatedly as long as there is a process named Safari.

You can install terminal-notifier with sudo gem install terminal-notifier.