GithubHelp home page GithubHelp logo

Comments (10)

sballin avatar sballin commented on July 29, 2024

Are you using the latest version, 1.4.3? If it's still not working please post the text in the debug log after you try to find and open a note. Take care to remove any private note contents if they show up there.

from alfred-search-notes-app.

pawsys avatar pawsys commented on July 29, 2024

from alfred-search-notes-app.

sballin avatar sballin commented on July 29, 2024

It works for me in Alfred 3 and Catalina. If you post the info from the debug log I may be able to help.

from alfred-search-notes-app.

pawsys avatar pawsys commented on July 29, 2024

from alfred-search-notes-app.

sballin avatar sballin commented on July 29, 2024

Follow the instructions here to open the debug log: https://www.alfredapp.com/help/workflows/advanced/debugger/

Then try to use the workflow and see the output that appears in the debug log.

from alfred-search-notes-app.

tiwood avatar tiwood commented on July 29, 2024

It seems Apple Script support in the Notes.app is broken in Catalina if iCloud Sync is enabled.
The following thread is from another application but the issue seems to be the same:
https://hookproductivity.com/help2/integration/hook-and-macos-10-15-catalina-notes-app/

This is the error I'm getting right now:

[8:11:25.813 PM] ERROR: Search Notes.app[Run NSAppleScript] {
    NSAppleScriptErrorAppName = Notes;
    NSAppleScriptErrorBriefMessage = "AppleEvent handler failed.";
    NSAppleScriptErrorMessage = "Notes got an error: AppleEvent handler failed.";
    NSAppleScriptErrorNumber = "-10000";
    NSAppleScriptErrorRange = "NSRange: {67, 20}";

from alfred-search-notes-app.

sballin avatar sballin commented on July 29, 2024

Thanks for the helpful info! Weirdly, I can't reproduce this. I was testing with "on my mac" notes on Catalina 10.15 + Alfred 3 before, but I upgraded to 10.15.1 and added my iCloud notes, and it continued to work. In Script Editor.app, can you try the following?

tell application "Notes" to return every note in default account

then after getting the list of x-coredata://... urls, copy one of them and try

tell application "Notes" to show note id "x-coredata://..." in default account

You can also play with removing in default account.

from alfred-search-notes-app.

sballin avatar sballin commented on July 29, 2024

One more question, your error happens after you successfully get the list of notes then try to open one, right?

I looked into whether it might be a permissions thing. In System Preferences -> Security & Privacy -> Privacy tab, under "Automation" I gave permission to Notes, which appears with a checkbox under Alfred 3. When I removed that permission, I got a different error, number -1743 with message "Not authorized to send Apple events to Notes."

from alfred-search-notes-app.

tiwood avatar tiwood commented on July 29, 2024

The error happens in the Show note or folder with given ID RunNSAppleScript action. The Notes listing works fine for me. Additionally I've checked the permissions and they look ok to me:

screenshot_2019-11-13_20-46-40


Update: I've just added in default account to the AppleScript and now it works!

on alfred_script(q)
	tell application "Notes"
		if q contains "Note"
			show note id q in default account
		else
			show folder id q in default account
		end if
	end tell
end alfred_script

I'm only storing notes in my default account, so this is a good workaround for me.

from alfred-search-notes-app.

sballin avatar sballin commented on July 29, 2024

I'm glad it works now, this was the fix in release 1.4.3, though it's also working without in default account for me on Catalina too... strange!

from alfred-search-notes-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.