 // This macro demonstrates how to get the active image's path

  macro "Exif Date/Time" {
       //requires('Exif Reader.jar');
       print(exifDT());
  }

  print(exifDT()); // in case user selects "Run Macro" 

  // Returns the active image's path. Returns a
  // string staring with "Error:" if there is an error.
  function exifDT() {
      if (nImages==0) return "Error: no images open";
      selectImage(getImageID);
      run("Exif Reader");
      selectWindow("EXIF Metadata for "+getTitle());
      info = getInfo();
      index = indexOf(info, "Date/Time Original");      
      if (index==-1) 
          return "Error: Date/Time not available for \"" + getTitle() + "\"";
      path = substring(info, index+19, index+38);
      return path;
  }

