Jump to content

n.a.k.

Level 1
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by n.a.k.


  1. On 1/10/2019 at 10:53 AM, DTLow said:

    tell application "Evernote"
         ...
         tell
    application id "com.apple.iWork.Numbers"
              ...
              
    repeat with theNote in theNoteList
                  
    add row below last row
                  
    tell last row
                         
    set value of cell 1 to theTag
                         
    set value of cell 2 to title of theNote
                    
    end repeat
    ....

    7

     

    Thanks @DTLow for the helpful code snippet!  I'm having trouble with this part of it:

                                set value of cell 4 to modification date of theNote
                                set value of cell 3 to creation date of theNote
                                set value of cell 2 to title of theNote
                                set value of cell 1 to tags of theNote

                                (full code below)

     

    It doesn't pick up the notes' properties.

    All works fine otherwise - it loops through each note, it would write "hello" in the right cell if that was the only thing I ask it to write, etc. I searched for hours with no solution.

    Many thanks from a first-time applescripter,

    N

     

    tell application "Evernote"
    	
    	set theNotes to find notes "notebook:Reference"
    	
    	tell application id "com.apple.iWork.Numbers"
    	
    		activate
    		
    		try
    			if not (exists document 1) then error number 1000
    			
    			tell document 1
    				
    				try
    					tell active sheet
    						set the selectedTable to ¬
    							(the first table whose class of selection range is range)
    					end tell
    				on error
    					error number 1001
    				end try
    
    				
    				tell selectedTable
    					
    					repeat with theNote in theNotes
    						
    						add row below last row
    						
    						tell last row
    							
    							set value of cell 5 to "hi"
    							set value of cell 4 to modification date of theNote
    							set value of cell 3 to creation date of theNote
    							set value of cell 2 to title of theNote
    							set value of cell 1 to tags of theNote
    						
    						end tell
    						
    					end repeat
    					
    				end tell
    				
    			end tell
    			
    		end try
    		
    	end tell
    	
    end tell
    

     

     

    Screen Shot 2019-01-20 at 2.23.02 PM.png

×
×
  • Create New...