How to run Applescript on Disk mount
The likely most robust solution is to create a launchd job with the StartOnMount property set to -boolean YES:


  StartOnMount &lt;boolean&gt;
  This optional key causes the job to be started every time a filesystem is mounted.


This is how Time Machine does it (see /System/Library/LaunchDaemons/com.apple.backupd-attach.plist).