Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Reputation Activity

  1. Like
    deanishe got a reaction from xattr in Set Audio MIDI Setup to connect bluetooth device   
    Hi @xattr, welcome to the forum.
     
    This isn't really something Alfred can help much with: it's a launcher, not an automation app, and it's ability to make other apps do things doesn't extend much beyond telling them to open files or URLs.
     
    If you want to make another application do something from Alfred, you basically first need to write a script or program to make the app do what you want, and then Alfred can run it for you.
     
    You might be able to do what you want with the proper MIDI APIs. If not, you're going to have to simulate mouse and menu clicks, which looks pretty difficult to do in this case. Something like Keyboard Maestro (which is designed for this kind of thing) might be able to do it more easily.
  2. Like
    deanishe got a reaction from xattr in Set Audio MIDI Setup to connect bluetooth device   
    It’s generally easier to write the script in Script Editor then move it over to Alfred once it’s working. Also, when you do, use a Run Script with Language = /usr/bin/osascript (AS), not Run NSAppleScript.
     
  3. Thanks
    deanishe got a reaction from Mschuiling in Can't get Evernote flow to work anymore...   
    Hi @Mschuiling, welcome to the forum.
     
    When you have a question about a specific workflow, ask it in the workflow's thread where the workflow's author and other users will see it. Please do not create a new thread.
     
     
  4. Like
    deanishe reacted to dfay in Fuzzy, self-updating list filter workflow template (working in 12.3)   
    You don't need two lists.  Just create one with your desired searchable text duplicated in the Title and the Subtitle fields.  e.g.
     
    myTitle,mySubtitle,myArg
    mySubtitle,myTitle,myArg
  5. Haha
    deanishe reacted to endercreeper41 in Calculate Anything   
    those are not real units.
  6. Like
    deanishe got a reaction from Chris Messina in MarkdownTransform — Convert Markdown to other formats   
    You might be better off with a link-specific workflow. Most Markdown converters are aimed at larger blocks of text and correspondingly wrap their output in block tags.
     
    I mean, the workflow has no way of knowing if you've selected a completely standalone link or a link somewhere in the middle of a document, so it can't really know whether to wrap its output in <p> tags or not.

    That way, you can also have a better link representation, too.
     
    This is the code I use to generate links to messages in MailMate:
     
    https://github.com/deanishe/CopyLink.mmBundle/blob/master/Support/bin/copylink
     
    Apart from no block tags in the HTML and no explicit formatting in the RTF representation, it also puts the URL (and page title) on the clipboard, so you can also run things like Alfred's Universal Actions for URLs against it. 
  7. Like
    deanishe got a reaction from Alfred-Chris in Action on file to create subfolder and move it to a specific folder   
    Yeah. I wouldn't touch Spark with a bargepole for precisely this reason. I don't know if they still do, but they also used to misrepresent Spark as a privacy-respecting email client.
     
    This workflow should do what you want. It's called "Save Attachments", but it will work with any files.
     
    It defaults to saving files to ~/Documents, but you can change that in the workflow's settings sheet.
  8. Like
    deanishe reacted to dfay in Pass a shortcut key and pull tabs from another app   
    It’s a rough road to head down but AS UI Scripting can probably help you here:
     
    The script at the last link is esp. helpful:
    http://hints.macworld.com/article.php?story=20111208191312748
     
     
  9. Like
    deanishe got a reaction from Philip_D in Prioritise specific workflow in Universal Actions when selected text on a specific web site   
    No, it's not, I'm afraid. Alfred current doesn't consider any context beyond the selected text and your previous choices.
     
    It’s technically possible (unless you use Firefox), but it’s a big change, and would be a lot slower than it currently is.
  10. Thanks
    deanishe got a reaction from Chris Messina in How to disable all Workflows?   
    Open your workflows folder and move all the workflows you want to disable into another directory temporarily.
  11. Like
    deanishe reacted to vitor in Alfred stopped finding files on Google Drive File Stream   
    Yes, but it’s an external gem and I’ve been having some oddities with the default Ruby setup where it stops working for some reason.

    Seems to be working now. I’ve updated the Google Drive SQLITE version.

    This one seems to be buttery smooth and is likely to be the winner. I’m predicting no major changes going forward. Thank you for the SQLite suggestion; I’m such a fan of the versatility of text files that I seldom remember the DB solution.
  12. Like
    deanishe got a reaction from vitor in MarkdownTransform — Convert Markdown to other formats   
    Yeah. Alfred puts everything on the pasteboard as plaintext (or RTF), so you'll need to populate the pasteboard yourself:
     
    ObjC.import('AppKit'); function copyLink(url, title) { title = title || url; let html = `<a href="${url}">${title}</a>`; let pboard = $.NSPasteboard.generalPasteboard; pboard.clearContents; pboard.setStringForType(url, 'public.url'); pboard.setStringForType(title, 'public.url-name'); pboard.setStringForType(html, 'public.html'); pboard.setStringForType(url, 'public.utf8-plain-text'); }  
  13. Thanks
    deanishe got a reaction from codedeeply in Workflow: Units - convert currency length temperature weight and more   
    In bash:
    curl -sfL -F v=3.6 -F "q=$1" http://units.dnsu.ch/units/server/alfred if [ $? -ne 0 ]; then echo '{"items": [{"title": "Units is unavailable", "subtitle": "sorry..", "icon": {"path": "Icons/error.png"}}]}' fi  
  14. Like
    deanishe got a reaction from evanfuchs in Unexplained "Experimental features in use" Notification?   
    I think you must have turned it on using defaults on the command line. There’s no GUI option or documentation because it’s experimental.
     
    The feature is something Andrew added to support one of Mr Pennyworth's workflows (perhaps the one linked below). Alfred emits notifications ("selected result #1", "selected result #2", etc.) that other apps can subscribe to, so the preview window from Mr Pennyworth's workflow knows what to show.
     
    It's perfectly harmless: Alfred only broadcasts the index of the selected result, not any of its contents.
     
     
     
  15. Like
    deanishe got a reaction from Alan He in node js in run script , not work   
    There is no way those commands are equivalent. You're running them from different directories with relative paths.
     
    If Alfred's debugger is isn't indicating any error, then the most likely explanation is that the script isn't outputting anything.
  16. Like
    deanishe got a reaction from mbert in Open all links in selection from a web page   
    If you want to do the link extraction in Alfred, you'll have to implement your own "get current selection", as Alfred will not give you rich text or HTML.
     
    I can point you at the code to for that if you like, but I think injecting JavaScript into the webpage is probably a better idea. Chrome and Safari have APIs for that.
  17. Thanks
    deanishe got a reaction from jopemachine in Universal action in workflow's script filter   
    The documentation does not say "forward". What do you mean by "forward"?
     
    Please try to use normal Alfred terminology or be more specific (e.g. "press ↩ on a result").
     
     
    The action field is the value that is passed to Universal Actions when you use Show Actions on it (hit TAB by default) instead of arg.
  18. Like
    deanishe got a reaction from vitor in MarkdownTransform — Convert Markdown to other formats   
    Doesn't really matter. What's relevant is what it puts on the clipboard.
     
    Can you make a link and check the RTF that it puts on the clipboard with Clipboard Viewer?
     
    https://langui.net/clipboard-viewer/
  19. Thanks
    deanishe got a reaction from Jan Peeters in How to Perform a Google Search of a Website I'm Browsing - Universal Actions?   
    First download and install the updated version of this workflow (I've added an External Trigger).
     
    Then open the Firefox workflow’s script directory (ffass > Open Scripts Directory) and use Script Editor to save this AppleScript in it (call it “Search Site” or similar):
     
    on run (argv) set _url to first item of argv tell application id "com.runningwithcrayons.Alfred" to run trigger "search-site" in workflow "net.deanishe.alfred.demo.universal-google" with argument _url end run  
    Now you should have a new "Search Site" action available in the tab actions and bookmark/history search in the Firefox workflow. You can assign it a Hotkey by adding one to the workflow similar to the example ones.
  20. Like
    deanishe got a reaction from Hao Tran in Search only folder names   
    Use a File Filter that only shows directories.
     
    There's an example workflow in Alfred Preferences that does exactly this (Alfred Preferences > Workflows > + > Examples > Simple Folder Search).
  21. Like
    deanishe got a reaction from Softov in Search only folder names   
    Use a File Filter that only shows directories.
     
    There's an example workflow in Alfred Preferences that does exactly this (Alfred Preferences > Workflows > + > Examples > Simple Folder Search).
  22. Thanks
    deanishe got a reaction from Hao Tran in How to remove application (or move it down) in suggestions   
    Hi, @faltoo, welcome to the forum.
     
     
    That's exactly why it's at the top. If you enter "pu" and select your "Show pull requests" action a few times, you'll retrain Alfred to put that first.
     
    You can tell Alfred to ignore AirPort Utility completely by adding the comment alfred:ignore to it (do a Get Info on the app in Finder). You can also reset Alfred’s “knowledge” in Alfred Preferences > Advanced > Clear Knowledge, but you’ll likely also lose a lot of training you’d rather keep.
     
    More generally, it's not a good idea to blindly action things in Alfred without checking what's selected first. Alfred runs several different searches in parallel (one for apps, one for your workflows, one for contacts, one for files etc.), so its results aren't deterministic. If you've trained Alfred to associate "Show pull requests" with "pu", then that will always end up at the top of the results, but only after Alfred has finished searching. If one of the other searches finishes first, something else is going to be in the top spot until your preferred result comes in.
  23. Like
    deanishe got a reaction from andy4222 in Script Filter not Triggering   
    Well, no. The entire point of Script Filters is that they’re run before you press ↩. They exist solely to generate the list of things you can press ↩ on.
     
    A Script Filter is supposed to output a list of results for Alfred to show the user, but you're calling a browser instead.
     
    Assuming you've set "Argument Optional" on the Script Filter, your script should look something like this:
    if [ -z "$1" ]; then echo '{"items": [{"title":"Open YouTube.com", "arg": "https://www.youtube.com"}]}' exit 0 fi ./search youtube-us "$1"  
    That will work, but modifying Searchio! that way is a bad idea because it will overwrite your changes the next time you add or remove a new search.
  24. Like
    deanishe got a reaction from andy4222 in Script Filter not Triggering   
    I only made the workflow. Andrew is Alfred's developer.
  25. Haha
    deanishe got a reaction from noahm in Get now playing song and pass it to a URL   
    Right. Don't use that: it's a bit stupid. 
×
×
  • Create New...