vitor Posted February 7, 2022 Posted February 7, 2022 Usage Search through installed AppleScript dictionaries via the asdic keyword. ↩ to open. A minority of apps use an older dictionary format which can be converted with the Universal Action. ⤓ Install on the Alfred Gallery | Source cands, Alan He and Kelson01 3
vitor Posted February 7, 2022 Author Posted February 7, 2022 When reporting issues, please include your exact installed versions of:The Workflow.Alfred.macOS.In addition to:The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better.
vitor Posted October 8, 2022 Author Posted October 8, 2022 Updated to 2022.4. Add configurable keyword.
Jasondm007 Posted February 13, 2023 Posted February 13, 2023 Hi @vitor - This is an awesome workflow! Thanks for sharing!! I have a couple of apps whose AppleScript dictionaries work perfectly fine (and are visible in the Script Editor's Library pane) but aren't visible in the workflow's output. Do you have any suggestions for troubleshooting these apps? For example, one dictionary that I use quite a bit, which won't load correctly, is DEVONthink 3. The other apps are all really minor; DEVONthink 3 is, really, the only important one. Thanks for any help you can lend, and for the great workflow! zeitlings 1
vitor Posted February 13, 2023 Author Posted February 13, 2023 Run :applescriptdictionariesforceupdate to force an update of the cache. May take a couple of minutes. If it still does not show up, where do you have DEVONthink installed (the full path)?
Jasondm007 Posted February 13, 2023 Posted February 13, 2023 @vitor Yeah, I've run that several times (re:forced update). But it never seems to find DEVONthink. The app's installed in my applications folder: /Applications/DEVONthink 3.app
Jasondm007 Posted February 13, 2023 Posted February 13, 2023 (edited) @vitor I'm not sure if it's relevant, but DEVONthink's SDEF file doesn't appear to be located in the usual place as most applications (i.e., it's not located in the app's Contents/Resources/ folder). See screenshot below. Path: /var/folders/l1/_hr3npwn4nz5m9j85w9_6g4c0000gn/T/DEVONthink 3.sdef I don't understand enough about how this works, but when you close the window above (for the DEVONthink library) the sdef file also automatically deletes itself from that location. It's odd. To see if it changed locations, I removed DEVONthink's library from Script Editor, and then added the app back ... and its SDEF always appeared at this location (i.e., when open - otherwise it magically disappears from that location). Edited February 13, 2023 by Jasondm007
vitor Posted February 14, 2023 Author Posted February 14, 2023 Indeed that will be the cause. I’ve poked a bit around the app but didn’t find it either. If you’re able to contact them and get how they’re storing it, I may be able to add support for it in the workflow (using that folder won’t work, because it’s not a fixed path for all users).
Jasondm007 Posted February 14, 2023 Posted February 14, 2023 3 hours ago, vitor said: Indeed that will be the cause. I’ve poked a bit around the app but didn’t find it either. If you’re able to contact them and get how they’re storing it, I may be able to add support for it in the workflow (using that folder won’t work, because it’s not a fixed path for all users). Thanks for taking a look at it, @vitor!! I'll reach out to their developers to see where it's being stored.
Jasondm007 Posted February 17, 2023 Posted February 17, 2023 Hi @vitor - This week, I ran several searches on my computer to try and track down DEVONthink's sdef file (e.g., sudo find / -name *.sdef -print 2>/dev/null). However, I was never able to locate it (i.e., beyond the temp one mentioned above). DEVONthink's development also confirmed the lack of an sdef file yesterday. They indicated that it relies on an older suite of files that are internal to the package: /Applications/DEVONthink 3.app/Contents/Resources/DEVONthink 3.scriptSuite /Applications/DEVONthink 3.app/Contents/Resources/DEVONthink 3.scriptTerminology By chance, is it possible for your workflow to use these files? I suspect that I know the answer, but I thought I'd ask. Thanks!
vitor Posted February 18, 2023 Author Posted February 18, 2023 2 hours ago, Jasondm007 said: They indicated that it relies on an older suite of files that are internal to the package: /Applications/DEVONthink 3.app/Contents/Resources/DEVONthink 3.scriptSuite /Applications/DEVONthink 3.app/Contents/Resources/DEVONthink 3.scriptTerminology By chance, is it possible for your workflow to use these files? I suspect that I know the answer, but I thought I'd ask. Thanks! Yeah, I found those when I poked around but unfortunately opening them didn’t work like with sdefs. Jasondm007 1
zeitlings Posted February 22, 2023 Posted February 22, 2023 As a quick fix, you could create the sdef for dt3 in the terminal. Then you just have to move it to a place where the workflow can detect it. sdef /Applications/DEVONthink\ 3.app > DEVONthink3.sdef Jasondm007 1
vitor Posted February 23, 2023 Author Posted February 23, 2023 On 2/22/2023 at 12:07 PM, zeitlings said: Then you just have to move it to a place where the workflow can detect it. Not exactly, because the workflow also depends on knowing where the app is so it can show the proper name and icon. But the sdef command is a good idea! I can’t just make it work for DEVONthink and other apps though because running it always opens the app. Which is a weird experience if your cache is rebuilding and suddenly a bunch of apps open. I went back and forth with a few options and ultimately decided on a Universal Action approach. @Jasondm007 Please update from within Alfred and try the new version. Use the Generate AppleScript Dictionary action on DEVONthink and it’ll show up in the workflow from then on. I’ve also removed the :applescriptdictionariesforceupdate in favour of updating with fn↩ on any result. Jasondm007 1
Jasondm007 Posted February 24, 2023 Posted February 24, 2023 Sorry for the slow response, @vitor. Thanks for updating the workflow! This is awesome!! Unfortunately, I received the following error when trying to generate a dictionary for DEVONthink: Am I correct that this new action in the workflow requires Xcode to be installed? I uninstalled Xcode a long time ago from my machine. But I guess I could always add it back again to get this part of the workflow up and running. Thanks again for all of your help!
vitor Posted February 25, 2023 Author Posted February 25, 2023 Indeed it looks like it needs the full Xcode for that part of the workflow to run. Kind of a heavy requirement but not much we can do. If you uninstall it after the dictionary creation, it should continue to work. Jasondm007 1
vitor Posted April 29, 2023 Author Posted April 29, 2023 Updated to 2023.3.Change cache rebuild shortcut to ⌘⌥⌃↩.Replace deprecated readDataToEndOfFile with readDataToEndOfFileAndReturnError.
vitor Posted July 7 Author Posted July 7 Updated to 2024.1.Increase speed of cache creation with Swift rewrite and mdquery search.Use caching from JSON.Remove cache busting.Skip Input as Universal Action.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now