Sunday, December 17, 2017

#1 2015-02-17 07:58:05 pm

JMichaelTX
Member
From:: Houston, TX (The Woodlands)
Registered: 2014-07-12
Posts: 139

Evernote - Set EN Mac Modification Date to Creation Date

REQUIRES:
  • Evernote Mac Versions:  5.5.2, 6.0.1+
  • Mac OS X:  Mavericks or Yosemite

Applescript:


(*
=================================================================
SCRIPT NAME:    Set EN ModificationDate to CreationDate

LAST DATE:    Tue, Feb 17, 2015        VER: 1.1.1

PURPOSE:
   â€¢ Set the EN Note Modification Date (AKA Updated Date) to its Creation Date
   â€¢ It operates on ALL Notes that are currently selected by the user

AUTHOR:    JMichael (member of Discussion.Evernote.com forum)
           Please PM me with any bugs/issues/questions

This script is based in large part on the script provided by HillFool in the EN Forum in this post:
[url]https://discussion.evernote.com/topic/60390-applescript-to-set-modification-date-to-created-date/?p=338039[/url]
                       
INSTALLATION:
       â€¢ Copy to your personal Scripts folder: /Users/<YourName>/Library/Scripts/
               (create the Scripts folder if it does not exist)

HOW TO USE
       â€¢ Select one or more Notes in Evernote
       â€¢ Click on the Apple Scripts menu in the upper right area of your menu
           â€¢ You can also use FastScripts ([url]http://www.red-sweater.com/fastscripts/[/url])
               to setup a KB shortcut.
       â€¢ Click on the name of this script
       â€¢ The script set Note Modification Date to the Note Creation Date for each Note in the selection
       â€¢ A completion dialog window will be briefly show when completed
=================================================================
*)


tell application "Evernote"
   set selNotes to selection
   set nNumNotes to (count selNotes)
   
   
   set sAns to display dialog ((nNumNotes as string) & " to be processed") giving up after 3
   
   -- THE BELOW IF TEST IS LIKELY NOT NECESSARY
   --    IF the User clicks "Cancel", it will cancel the script
   
   if sAns is false then
       display alert "User Canceled Script"
       error number -128 -- EXIT this script
   end if
   
   
   repeat with iNote from 1 to nNumNotes
       
       set oNote to item iNote of selNotes
       set (modification date of oNote) to (creation date of oNote)
       
   end repeat
   
   beep
   display dialog (nNumNotes as string) & " Notes Updated Date set to Creation Date" buttons {"OK"} default button 1 giving up after 3
end tell

Last edited by JMichaelTX (2015-02-17 10:25:32 pm)


iMac-27 Late 2015 Retina 5K Screen (& others)
macOS 10.11.6 (El Capitan)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)