Jump to content
AdmiralPat

need a script

Recommended Posts

  • Need a script to copy content from a Filemaker Pro database field and past it in Evernote search to do a look-up.

Share this post


Link to post
On 2018-04-14 at 2:28 PM, AdmiralPat said:
  • Need a script to copy content from a Filemaker Pro database field and past it in Evernote search to do a look-up.

If you're using a Mac, both apps are have Applescript support

Documentation at http://preserve.mactech.com/articles/mactech/Vol.22/22.04/ScriptingFileMakerPro/index.html

You can also look at the export options in Filemaker; for example html

  • Like 1

Share this post


Link to post

OK thanks. I'll give this a try but I'm  not really a programer but I'll try a figure it out.  Maybe  I'll surprise myself.

Share this post


Link to post

OK I got to the this point

In Filemaker Pro script

Go to Flield + Copy content + Send Event ["Evernote";"aevt";"oapp"; ""] Evernote opens

Now how do I select the search notes field in Evernote and paste the contents and do a search?

 

Share this post


Link to post
8 hours ago, AdmiralPat said:

Now how do I select the search notes field in Evernote and paste the contents and do a search?

Example of a search

tell application "Evernote"
     set theNotes to find notes ("intitle:\"" & journalnote & "\"")
end tell5ad6707fb09a7_ScreenShot2018-04-17at15_08_41.png.0c3d1358aafdd046b54cf9d316a45429.png

 

Example of creating a note

tell application "Evernote"
     
set note_Title to "Status Evernote Backup Script - " & yyyymmdd
     
set new_Note to (create note with text scriptLog title note_Title notebook "Filing?")
     
assign tag "!Archive" to new_Note5ad69237ca67b_ScreenShot2018-04-17at17_31_35.png.88bceda2b031a00a9fff3cf4774594fc.png
end tell

 

 

 

Example of appending to a note

tell application "Evernote"
     append theNote html newText
end tell5ad6707c339b9_ScreenShot2018-04-17at15_07_59.png.383bd112f3c3b6a45ec69b0da9fee0f3.png

 

  • Confused 1

Share this post


Link to post
2 hours ago, AdmiralPat said:

OK I got to the this point

In Filemaker Pro script

Go to Flield + Copy content + Send Event ["Evernote";"aevt";"oapp"; ""] Evernote opens

Now how do I select the search notes field in Evernote and paste the contents and do a search?

 

I don't know FMP that well, but I have a colleague who is an expert in it, and is in the process of exporting a large FMP database to Apple Pages.

I will ask him about this, and once we know how to get the data out of FMP, putting it into EN Mac will be easy.  I'll be glad to help, but you may need to be patient, as I don't  know how long it will take my colleague  to response.  Feel free to ping me with a PM here if you don't hear from me after a week.

  • Like 1

Share this post


Link to post
On 4/14/2018 at 4:28 PM, AdmiralPat said:

Need a script to copy content from a Filemaker Pro database field and past it in Evernote search to do a look-up.

OK, now that I have reread your request, I'm not sure I understand it correctly.

  1. Do you want to export all of your FMP records to Evernote Notes?
    OR
  2. Simply extract data from a selected field in a selected record in FMP, and use that to search for Notes in Evernote?

It would be helpful if you could post a detailed set of steps of how you are doing this manually now, along with screenshots of the data in FMP, and then in EN Mac.

  • Like 1

Share this post


Link to post

Ahoy Guru!!

Thanks for your help.

I'm do # 2  Simply extract data from a selected field in a selected record in FMP, and use that to search for Notes in Evernote?

I select the field that is a confirmation # in my FMP datebase and copy and paste it in Evernote's "Search notes" window to locate all

the .pdfs associated with that confirmation # stored in Evernote. I would like to automate this step by clicking on a button in FMP.

I'm on a MAC 10.11.6,  FMP13 and Evernote v7.1

Share this post


Link to post
15 hours ago, DTLow said:

Example of a search

tell application "Evernote"
     set theNotes to find notes ("intitle:\"" & journalnote & "\"")
end tell5ad6707fb09a7_ScreenShot2018-04-17at15_08_41.png.0c3d1358aafdd046b54cf9d316a45429.png

 

Example of creating a note

tell application "Evernote"
     
set note_Title to "Status Evernote Backup Script - " & yyyymmdd
     
set new_Note to (create note with text scriptLog title note_Title notebook "Filing?")
     
assign tag "!Archive" to new_Note5ad69237ca67b_ScreenShot2018-04-17at17_31_35.png.88bceda2b031a00a9fff3cf4774594fc.png
end tell

 

 

 

Example of appending to a note

tell application "Evernote"
     append theNote html newText
end tell5ad6707c339b9_ScreenShot2018-04-17at15_07_59.png.383bd112f3c3b6a45ec69b0da9fee0f3.png

 

 

Ahoy DTLow

This is what got back from tell application "Evernote"
     set theNotes to find notes ("intitle:\"" & journalnote & "\"")
end tell

error "Evernote got an error: Can’t make {note, \"\\\"\"} into type text." number -1700 from {note, "\""} to text

???

 

 

Share this post


Link to post
13 minutes ago, AdmiralPat said:

This is what got back from tell application "Evernote"
     set theNotes to find notes ("intitle:\"" & journalnote & "\"")
end tell

error "Evernote got an error: Can’t make {note, \"\\\"\"} into type text." number -1700 from {note, "\""} to text

???

What value did you assigne to journalnote?

  • Thanks 1

Share this post


Link to post

Ahoy DTLow,

Oh... I'm not sure what to do with journalnote ??? What should go here???

Pat

Share this post


Link to post
11 minutes ago, AdmiralPat said:

Oh... I'm not sure what to do with journalnote ??? What should go here???

You posted code that gave an error message          set theNotes to find notes ("intitle:\"" & journalnote & "\"")
It uses a variable called  
journalnote
You need to assign this to the value you're searching for

Share this post


Link to post

AHOY!!

I think I used "Search Note".  

Again, all I'm trying to do is  select the field that is a confirmation # in my FMP datebase and copy and paste it in Evernote's "Search notes" window to locate all

the .pdfs associated with that confirmation # stored in Evernote. I would like to automate this step by clicking on a button in my FMP database .

I'm on a MAC OS 10.11.6,  FMP13 and Evernote v7.1

Pat

 

Share this post


Link to post
32 minutes ago, AdmiralPat said:

I think I used "Search Note".  

Again, all I'm trying to do is  select the field that is a confirmation # in my FMP datebase and copy and paste it in Evernote's "Search notes" window to locate all

the .pdfs associated with that confirmation # stored in Evernote. I would like to automate this step by clicking on a button in my FMP database .

set theNotes to find notes ("intitle:\"" & journalnote & "\"")

This code is the equivalent of using the search box in Evernote
If you    set journalnote to "Search Note"; the equivalent is searcing for       intitle:"Search Note"
It's a valid search, but probably not what you intended
You might use     set theNotes to find notes ("intitle:\"" & confirmation# & "\"")

Share this post


Link to post

?? But I'm pasting from the clipboard into Evernote, am I not??

When I tell FMP script to go to Confo. # field and copy the content and then go to Evernote doesn't that copied information come from the clipboard?

So I want to copy the clipboard content into the "Search note" in Evernote. 

From FMP to Evernote.pdf

Share this post


Link to post
1 hour ago, AdmiralPat said:

When I tell FMP script to go to Confo. # field and copy the content and then go to Evernote doesn't that copied information come from the clipboard?

I'm not an FMP User but you could post the script for review.

The script code controls where the data is copied to; a variable, the clipboard, ...

>>So I want to copy the clipboard content into the "Search note" in Evernote. 

I'm not clear on your use of the term "Search Note"5ad7a0dc9b31f_ScreenShot2018-04-18at12_43_08.png.471861f1145a04d4a1977aa4d51238ba.png

If your target is the search box in Evernote, here's sample code

 

tell application "Evernote"
      set
query string of window 1 to searchQuery
      
activate
end tell5ad7a1a868288_ScreenShot2018-04-18at12_50_45.png.b07d65b51983f4963fca73596a0d7da7.png

Share this post


Link to post
30 minutes ago, AdmiralPat said:

Ahoy!!

The field you have circled in red is where I want to place the information I copied from FMP and do a find.

my FMP script.pdf

Looking at your script5ad7b698cab18_ScreenShot2018-04-18at14_10_47.png.3b4a467989c5951d3b1319808148819e.png

I see the Copy, which copies the Confo# to the clipboard

I don't think the Send Event does anything; Evernote is not set up to receive Apple Events

The AppleScript code would be

tell application "Evernote"
      set 
query string of window 1 to the clipboard
      
activate
end tell

 

  • Thanks 1

Share this post


Link to post

Ahoy DTLow,

It WORKS !!!! It WORK!!!! SUCCESS!!

Send Event opens the Evernote App. (if it's closed) and brings it to the foreground. Adding what you just gave me to Perform AppleScript made it work perfectly !!!

THANK YOU SOOOO MUCH!! If your ever in the Boston, MA area I'll by you a drink. :)

Pat

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...