glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.3k stars 465 forks source link

[WISH] AppleScript support? #328

Open gingerbeardman opened 6 years ago

gingerbeardman commented 6 years ago

Would be great to be able to script the app

glushchenko commented 6 years ago

What did you mean under Apple Script support?

gingerbeardman commented 6 years ago

Ability for AppleScript to control various functions of FSNotes.

So that I can create notes using, for example:

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
jeff-h commented 6 years ago

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).

gingerbeardman commented 6 years ago

Yes, you make a good point @jeff-h

peavine commented 6 years ago

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.

jeff-h commented 6 years ago

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

peavine commented 6 years ago

@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.

tewe commented 1 year ago

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.