Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by dfay

  1. Sorry missed this. I hadn't used it for a long time but tried it out with a new Sierra install and it worked fine straight away with the exception of the Today and Notification Center commands. It's all using AppleScript to simulate keypresses and mouse clicks, so it may depend on what your keystrokes are set to. You could try replacing the AppleScripts with Dispatch Key Combo actions - those weren't available back when I made it. You can fix Today and Notification Center by changing one line in the AppleScripts: click menu bar item "Notification Center" of menu bar 2 change it to click menu bar item "Notification Center" of menu bar 1
  2. Here is a counterpart to the above workflow, to search the Skim notes of the currently open file. https://dl.dropboxusercontent.com/u/6601556/Alfred/Search Skim Notes (Active Document).alfredworkflow Skim's bookmarks are by page rather than by text, so they are not searchable directly but it would be easy to designate a note type and style that you only use for bookmarking (e.g. red highlights) and then limit the search accordingly to make a version that would just search them.
  3. Seems like a lot of work to index all your metadata, build your own database parallel to Spotlight, and maintain the index and links to files.
  4. Note that you can add Finder tags in the standard MacOS file save dialog, with auto-complete. These can then appear in the Finder sidebar. You can also manage tags with this workflow: or roll your own using https://github.com/jdberry/tag But again, the basic functionality of adding a tag while you're saving a file is already there natively in MacOS without Alfred.
  5. For future reference to anyone interested, here's how I solved this problem in AppleScript, in this case to run different Chronosync documents per machine. (In addition, I have a post-run script set up in Chronosync that updates a file in Dropbox indicating which machine the sync last ran on, and a Script Filter in Alfred that displays this status as a subtitle - can post if anyone's interested). set theComp to computer name of (system info) tell application "ChronoSync" if theComp contains "MBA" then open "/Users/username/Documents/archive/MBA to MyUSBStick.sync" else if theComp contains "iMac - work" then open "/Users/username/Documents/ChronoSync Documents/MyUSBStick Documents <> iMac - work.sync" else if theComp contains "MBP" then open "/Users/username/Documents/archive/MBP to MyUSBStick.sync" else if theComp contains "Mac Mini" then open "/Users/username/Documents/ChronoSync Documents/Mac Mini to MyUSBStick.sync" end if Trial Sync document 1 end tell
  6. You can create a workflow to search Skim notes and open the corresponding PDF from Alfred quite easily...just tried it: 1) create a file filter for Skim notes (see link above on creating file filters) 2) connect 1) to a Replace action & replace skim with pdf 3) connect 2) to a File Open action Here: https://www.dropbox.com/s/yjeurvlbhhd1aum/Simple Skim Notes Search.alfredworkflow?dl=0 2016-12-11 edit: you will probably also want to add kMDItemTextContent in the Advanced tab so that Alfred is searching the full text of the Skim notes.
  7. I just looked at the metadata on an existing pdf (using mdls , the command-line program to access Spotlight metadata) then added a bookmark in Preview to that PDF, and looked at the metadata again. The bad news is that Preview isn't saving the Bookmarks as metadata - they're encoded directly in the PDF....so you would need to use a tool like pdftk to read the bookmarks ... but you don't want to do that for each file each time you search....so you'd need to cache it.... The other option is to use Skim and have it save separate skim notes files - this won't save bookmarks per se but it will create searchable files with all your annotations -- see http://apple.stackexchange.com/questions/41013/is-there-a-way-spotlight-indexes-my-skim-bookmarks-notes. (There's also a preference in Skim to make it create the Skim notes files by default). Having said that I've got a library of +/- 8000 PDFs and in 12 years with Skim I don't think I've ever searched my annotations directly -- they all end up in a BibDesk database and I search the accompanying bibliographical records instead. BibDesk allows the option to search within Skim notes (same developers), which works great on the rare occasions when I need it. The pain with Skim is that if you're round-tripping to iOS you need to regularly be converting Skim notes to standard PDF annotations and vice versa. (This actually has got me thinking about dropping Skim, but there's nothing else I've found that is as customizable or scriptable. Even though @smarg19's Skimmer workflow hasn't been updated in ages....). If someone could write a cross-platform PDF editor that has a URL scheme that allows linking and indexing of annotations on iOS and MacOS I'd buy it in a second. Following-up - it looks like the developers of Skim and BibDesk have ruled out searching standard (i.e. non-Skim) PDF annotations precisely because they are not included in metadata - see https://sourceforge.net/p/bibdesk/feature-requests/760/
  8. Or if you don't want to reinvent the wheel you can use a file filter in Alfred: https://www.alfredapp.com/help/workflows/inputs/file-filter/
  9. This is going to depend on the capabilities of Spark, and given that Readdle has added zero scripting support to PDF Expert for the Mac despite user requests, I wouldn't get your hopes up.
  10. File actions to set wallpaper by display, useful if you use two monitors. I like the 12 South collection of dual monitor wallpapers, linked from here: http://www.lifehack.org/articles/technology/5-sites-with-beautiful-free-dual-screen-wallpapers.html Workflow available on Packal
  11. I'm not thinking app detection but actually being able to have a custom touch bar to go with a particular Alfred workflow - right now I have a workflow that searches BibDesk and does different things with the result based on no modifier, shift, command, control, and alt/option keys held. Right now I need to hold each key to see the reminder for which each one does (and I've run out of modifier keys). I'd love to stick all those actions up on the touch bar.
  12. Has anyone looked at the new APIs to see if this would be possible? I'd love to be able to throw a menu of actions onto the touch bar rather than relying on modifier keys.
  13. Thanks so much for this. I had something similar cobbled together from others' and my own AppleScript for TP2 but there's no way I was going to have time to update it all in JXA.
  14. I don't have it installed to test but it's probably a matter of changing refs to Alfred-2 in the paths above to Alfred-3
  15. (Trivially but crucially) updated AppleScript for Keynote 7 at https://github.com/derickfay/keynote-to-pdf
  16. For Safari 10 you need to change the AppleScript so that "Details..." reads "Manage Website Data…" Here's the full script: set theWebsite to "{query}" tell application "Safari" to activate delay 2 tell application "System Events" to tell process "Safari" keystroke "," using command down delay 2 tell window 1 click button "Privacy" of tool bar 1 delay 5 click button "Manage Website Data…" of group 1 of group 1 delay 2 keystroke theWebsite delay 1 keystroke tab delay 1 keystroke "a" using command down click button "Remove" of sheet 1 click button "Done" of sheet 1 end tell keystroke "w" using command down end tell
  17. You can use Applescript to write a workflow that behaves differently depending on which computer it's running on. Basically you'd set your hotkey to call an Applescript like this: set theComp to computer name of (system info) if theComp = "computer A" then // do something else if theComp = "computer B" then return end if
  18. Should be fine - Launch Services is the database that tells OS X what program to use to open a particular file. It gets corrupted now and again, and loses track of file types (hence the dyn. prefix - dynamically generated, instead of the correct identifier for a tex file).
  19. out of curiosity did rebuilding Launch Services not work? the dyn.adfhladjksfjlakdsfjaldfkjasdjkl filetype was what led me to that fix before
  20. Try rebuilding launch services - see http://www.alfredforum.com/topic/9196-add-specific-file-type-in-this-case-markdown/?hl=%2Blaunch+%2Bservices#entry45898
  21. Oh good. I've spent way too much time debugging AppleScripts that use various key presses, so when I saw the keystroke command there, it looked like a likely culprit
  22. I should know since I did this three times in the past year.... as I recall I just pointed the new installation at the existing sync folder on dropbox (obviously you need to reinstall the dropbox client first and let it finish syncing). I'd make a backup first and just try that. I certainly don't recall any problems or needing to do any additional configuration.
  23. Are you using option-space as your hotkey for Alfred? The script is trying to get Evernote to do something by simulating an option-space keypress in System Events.
  24. It's not a default feature but there's a simple workflow which will open AirDrop: http://www.alfredforum.com/topic/643-open-a-new-airdrop-window-in-finder/
×
×
  • Create New...