fsnotes icon indicating copy to clipboard operation
fsnotes copied to clipboard

[WISH] AppleScript support?

Open gingerbeardman opened this issue 7 years ago • 8 comments

Would be great to be able to script the app

gingerbeardman avatar Aug 08 '18 08:08 gingerbeardman

What did you mean under Apple Script support?

glushchenko avatar Aug 14 '18 12:08 glushchenko

Ability for AppleScript to control various functions of FSNotes.

So that I can create notes using, for example:

  • the output of a shell script
  • current selected text in Safari
  • current page in Safari
  • etc

Take a look at Script Editor, add an app such as BBEdit, then look at what it offers.

screen shot 2018-08-14 at 13 21 57

gingerbeardman avatar Aug 14 '18 12:08 gingerbeardman

Sounds like a cool idea, but I wonder just how relevant it is given how FSNotes uses a totally standard and open file format, and how it watches the filesystem for changes.

You could for example just dump out of your script to a text file without needing any FSNotes scripting support, and next time you're in FSNotes the new note will just be there. (Sorry, I am a bit rusty with AppleScript but with, for example, a shell script this would be trivial).

jeff-h avatar Aug 14 '18 23:08 jeff-h

Yes, you make a good point @jeff-h

gingerbeardman avatar Aug 15 '18 00:08 gingerbeardman

I use applescript a lot and would like to see FSNotes support applescript. Although, just for now, it seems like other requested enhancements would be more important. I noticed @gingerbeardman marked this as [WISH] which is thumbs-up for me.

peavine avatar Aug 16 '18 15:08 peavine

@peavine what would you like the AppleScript support to provide?

jeff-h avatar Aug 17 '18 21:08 jeff-h

@jeff-h. It's easier for me to answer your question by way of example.

I frequently use an applecript that takes a screenshot of the active app. For this to work, the script has to obtain a window id from the active app, and this is possible AFAIK only with apps that support applescript.

Also, I would like to write an applescript that saves a time-stamped copy of the note currently selected in FSNotes. This appears possible with applescript only if I can get from FSNotes the name of the currently selected note.

There are other ways to accomplish the above, but FSNotes support of applescript would be a nice convenience.

peavine avatar Aug 17 '18 21:08 peavine

I wonder just how relevant it is given how FSNotes uses a totally standard and open file format, and how it watches the filesystem for changes.

That only help with new notes. To work with existing notes requires a way to get the path of the file currently displayed in the frontmost window. I'd be fine with just that, from AppleScript.

tewe avatar Jun 02 '23 01:06 tewe