How to get screenshot only external monitor?
Manually, you can always use Cmd + Shift + 4 and select the area you want.

OR

For Applescript, check out this post: https://stackoverflow.com/questions/8764072/screen-capture-with-applescript


  set imagePath to (path to desktop as text) &amp; "screenCapture.png" do
  shell script "screencapture -mx -T0 " &amp; quoted form of POSIX path of
  imagePath