Jump to content

Jasondm007

Member
  • Content Count

    277
  • Joined

  • Last visited

  • Days Won

    10

Reputation Activity

  1. Thanks
    Jasondm007 reacted to deanishe in Filtering JSON Output: A Very Basic Python Question   
    FWIW, this could be shortened to:
     
    query = sys.argv[1].strip() if len(sys.argv) > 1 else ''  
    Or a bit more verbosely:
     
    query = '' if len(sys.argv) > 1: query = sys.argv[1].strip()  
  2. Thanks
    Jasondm007 reacted to Andrew in Add Option for Users to Define the Default Navigation Escape Behavior - A Feature Request   
    Thanks for the feedback, I sometimes add options into workflows first to see how well they are received, and how well they work.
     
    I already have a note to bring this same option from the Browse in Alfred to the default navigation options, but at this point, it will likely remain a simple checkbox to keep this complexity of understanding this feature low.
     
    Cheers,
    Andrew
  3. Like
    Jasondm007 got a reaction from OAL in [SOLVED] App-specific Hotkeys w. Same Key Combination?   
    Thanks for your help, @deanishe & @vitor!! I'm glad to hear that I'm not just overlooking something.
     
    In any case, I took your advice and reposted it in the Feature Request section: 
     
     
  4. Like
    Jasondm007 got a reaction from ZDL-alfred in Multiple keywords for a single script filter   
    Hi @Vero,
     
    Thanks for getting back to me and for the suggestion! I really appreciate it.
     
    Would your method work for script filters that are running queries within Alfred's search box (and then providing you with the appropriate options)?
     
    For example, I'm a big fan of Paul Wirth's Do Not Disturb workflow, but I can never remember the precise keyword. It's setup so that when you type "dnd" it will run a query to see if your Do Not Disturb setting is already on. If it is, it will tell you that it's on and then it allows you to select whether you want to turn it off. Of course, if it's off, it does the opposite (See screenshots: normal.jpg and scriptfilter.jpg below).
     

     

     
    To get around having to remember the precise keyword, I just duplicated the script filter with a new keyword (e.g., not and notifications) and then reattached everything (see screenshot duplicated.jpg).
     

     
    This seemed a little odd, so that's why I posed my question yesterday. I was hoping that you could simply type something like "dnd" OR "notifications" in the script filter, but this seemed like an OK workaround.
     
    I tried using the method you describe above (e.g., creating multiple keywords and then having them feed to the script filter or even a normal script), but I couldn't get it working. The query that determines whether your Do Not Disturb setting is on no longer works when using this method.
     
    As you can tell, I'm new to Alfred (and am not a programmer). Any advice you may have is most appreciated. 
     
    Thanks for your help!!
     
  5. Like
    Jasondm007 reacted to Andrew in Directly accessing recently-accessed documents from Alfred-selected app?   
    You can just double tap your action key (configured in Alfred's Features > Actions > Show Actions) e.g. if you have right arrow configured to show actions, search for an app, then double tap right arrow to the get the recent actions.
     
    I have a ticket which will allow further control over the Action in Alfred workflow object based on this suggestion:
     
     
  6. Like
    Jasondm007 reacted to Andrew in Add Browser Options for Alfred's Web Bookmarks & Search Features   
    What's most likely to happen here is Alfred will expose the underlying Bookmarks input filter to workflows, so you have more control over configuring and actioning bookmarks.
  7. Thanks
    Jasondm007 reacted to deanishe in Filtering JSON Output: A Very Basic Python Question   
    https://diveintopython3.net/
  8. Thanks
    Jasondm007 reacted to deanishe in Filtering JSON Output: A Very Basic Python Question   
    Sorry, this bit was wrong (wrong data structure).
     
    result['items'] = [d for d in result['items'] if d['title'] not in titles_remove] json.dump(result, sys.stdout)  
  9. Like
    Jasondm007 reacted to vitor in Filtering JSON Output: A Very Basic Python Question   
    As a user of Neovim myself, I doubt @deanishe is recommending you use it. Vim’s a hard editor to grasp and you’ll be fighting to set it up and use it for a while, which is definitely not what you need right now.
     
    Sublime Text is good, but it is paid (or it nags you). Consider Visual Studio Code. It’s simple, capable, free and open-source, actively developed by a major company (Microsoft), and insanely popular (which translates to a vast plugin system). Yes, it’s build on Electron, but it’s far from the worst use of it.
  10. Like
    Jasondm007 got a reaction from vitor in Filtering JSON Output: A Very Basic Python Question   
    I have a very basic python question that I was hoping to get a little help with that involves filtering out list items in a script filter. At the moment, the script filter works great except that it includes a few items I'd prefer not to see in Alfred's output. Is there any easy way to remove items whose titles can be found in another list?
     
    Admittedly, I normally do these sorts of things in AppleScript - which is pretty easy to do in this case - except that I’ve been trying to learn a little python, given all of the limitations with AppleScript (which @deanishe and @vitor have rightly reminded me of on numerous occasions, so hopefully this will make them proud 😃).
     
    For example, let’s say that I have the following list:
     
    titles_remove = {"Title A", "Title B", "Title C"}  
    And, before outputting my results in Alfred, I’d like to remove all items whose titles can be found in titles_remove.
     
    At the moment, my script filter ends with the following line:
     
    print(json.dumps(result))  
    And, it’s JSON output follows the usual format where each item has a title, subtitle, uid, and arg. Now, if I modify that last line so that it’s output is:
     
    unfiltered_output = json.dumps(result)  
    What should I do next to remove items whose titles can be found in the titles_remove list?
     
    I tried following several different python tutorials, but I kept receiving errors. I suspect that some of the methods weren't intended for dealing with strings. But I'm a complete newbie here. 
     
    Thanks for any help you can lend! I really appreciate it. And, if anyone has any advice for python newbies that might want to do things with Alfred, I'd greatly appreciate any recommendations on potential resources to check out, etc. Thanks!!
  11. Like
    Jasondm007 got a reaction from JolinM in create new folder   
    @Carlos-Sz Is there any way you could post your workflow again (re: file action to move files to a new folder)? The previous link no longer works. Thanks for your help!
     
    Or, of others have an updated version, that'd be great, too. Thanks!
  12. Like
    Jasondm007 got a reaction from nikivi in Direct Access to Alfred's Default File Actions - A Feature Request   
    I would love to be able to directly access all of Alfred's default file actions in my workflows.
     
    @Andrew recently added some awesome new actions for the buffer - and, Alfred already included some of the other default file actions, like Reveal and Browse - but I'd love to be able to access other default file actions, too - such as Open With, Recent Documents, etc. At the moment, if you want to access these without extra steps, you have to use GUI-based approaches that type the file action's name into the File Action panel, which are always imminently fragile and problematic.
     
    There are a variety of ways this could be implemented, but here are some early thoughts:
    Create a new action, in the Actions section - perhaps called Run File Action - where the user can use a drop down to select the file action they would like to run on the file paths that are being passed to it. You might think of it as a more specific application of the "Action in Alfred" action. At a minimum, the dropdown should be populated by whatever file actions the user has enabled (Features > Actions > File Actions). However, if you wanted to get fancy, it'd be even better if the dropdown included both Alfred's file actions AND any the user has created. In theory, the dropdown might operate something like Alfred's "Call External" output, except that it is displaying Alfred's default file actions and any the user created.  Add a new option in the "Action in Alfred" action, which includes a dropdown allowing the user to specify the action that will be run on the file paths included above. The dropdown could operate like either of the options described above (just default file actions or include the user's file actions, too). Unless the user enables this option, of course, the default would be to send the file paths to Alfred's File Actions panel, allowing the user to select for themselves (i.e., the same way they do now). Add a new option to the "Call External Trigger" output that allows the user to access Alfred's default file actions Provide AppleScript access - enhance this existing "actions" command. Example: tell application "Alfred" to action OpenWith theFilePaths  
    If I had to choose from these options, I'd probably go with the first or second option. But I honestly don't care how it gets accomplished! And, while I didn't include it above, if you really wanted to step things up, I would include some kind of error feedback mechanism - such as a notification, etc - for when users pass file paths to file actions they should not have - such as when they've passed more than one file to an action that can only handle one file, or when the file action is tied to a specific file type that does not match the files the user is trying to pass to it. Again, these are just fancy bells and whistles, I'm not picky here!!
     
    @Andrew Is there any way we can get better access to Alfred's default file actions? 🙏 They're great, and I'd like to start tapping in to these more - as opposed to trying to recreate them myself, in a workflow, or going to GUI route. As always, thanks for your consideration! Long Live Alfred!!
  13. Like
    Jasondm007 reacted to csaborio in Apple Music Workflow to add Current Song to Playlist   
    Hey! Unfortunately, I've given up on this.
     
    I just switch to iTunes and add the song directly to the playlist. I used to love to this via Alfred, but the hours I've spent trying to automate everything are simply not worth my time or anger.
     
    Apple needs to kill Applescript.
  14. Like
    Jasondm007 reacted to vitor in Add to Buffer: (1) Selection Hotkey or (2) File Action - Feature Request   
    Good news. It’s coming!
     
  15. Like
    Jasondm007 reacted to sballin in Search Apple/iCloud Notes   
    Version 3.0.0 is out! Notes for this release:
    Rewritten in Go Faster searching Create a new note if none was found Shift+enter to search for query using Notes in-app search
  16. Like
    Jasondm007 reacted to Andrew in Allow App-specific Hotkeys to Use the Same Key Combinations   
    Just as a little sneak... native support for assigning the same hotkey to multiple Hotkey Triggers throughout the same and different workflows is coming to Alfred 4.1
  17. Thanks
    Jasondm007 reacted to vitor in [SOLVED] App-specific Hotkeys w. Same Key Combination?   
    Marking as solved (resolution was the opening of a feature request), to reduce confusion.
  18. Haha
    Jasondm007 got a reaction from Alan He in GUI Feature Request - Allow users to expand the left panel in Alfred's Preferences   
    Christmas Wish for Alfred: I wish users had some control over the size of the left panel in Alfred's Preferences (not the sidebar, but the panel next to it).
     
    As shown below, I'd like to be able to drag the panel right - at times, when viewing my Workflows - as the current fixed version doesn't allow users to see much of their workflows' names. Personally, I keep a lot of resources to use as examples for building or modifying new workflows, but it's impossible to see their titles or descriptions under the current space allotment (i.e., even if I went to a less ridiculous naming convention).😀
     
    Thanks for your consideration!
     

  19. Like
    Jasondm007 reacted to vitor in RecentDownloads — List and act on the contents of a directory   
    Technically yes, but I’ve just tried it and there’s a severe speed tax due to having to check every file for the hidden flag, so I won’t implement it.
  20. Like
    Jasondm007 reacted to Andrew in Hotkeys & Results of Past Queries   
    There were a couple deliberate design decisions I made with this behaviour, which you've already noticed:
    When showing Alfred with the previously typed text, this is highlighted automatically so that it can easily be overtyped. Selection in macOS works by using ⌘C in any app, it doesn't matter the context, e.g. a textual path in Terminal will work as well as a file in Finder. For intrinsic usability, if there is a text selection at any point in Alfred's input field, ⌘C will copy this instead of the highlighted result. The selection in the hotkey you are using is disconnected from and agnostic of the underlying app, which is why it can't work like one of the built-in action modifiers. To clarify, you use the hotkey, it simulates ⌘C and uses the result. It just so happens that this also works within Alfred's own window because Alfred presents the results as copyable.
     
    To "work around" this issue, you could always press the left arrow before using your hotkey to select the file. This would move the caret to the left of the typed query (while not invoking the default right arrow actions panel), then there is no selection in the input field, allowing for ⌘C to take the selected result.
     
    As for a behaviour change, I'm not overly keen on arrow down automatically clearing the selection as suggested. This wouldn't be consistent behaviour across Alfred, and wouldn't match macOS built-in behaviour (e.g. Spotlight). This would also be inconsistent for the top result (without pressing the down arrow) vs subsequent results after pressing the down arrow and results being cleared.
     
    In your workflow, you could setup the following which would achieve what you need:
     
    Hotkey > Dispatch left arrow > Dispatch ⌘C > Delay 0.1 > Arg/Var putting {clipboard} into Argument > ...  
    I'll have a bit of a think about some other workarounds to this issue, but it's not a common problem as I can't remember if this has come up before.
     
    Cheers,
    Andrew
  21. Like
    Jasondm007 reacted to deanishe in Hotkeys & Results of Past Queries   
    I don't think Andrew intentionally chose this behaviour. I'd submit a feature request for your suggested behaviour if I were you.
  22. Like
    Jasondm007 got a reaction from xilopaint in PDF Actions (so far only splitting double pages)   
    @dfay & @xilopaint - Thank you both so much for sharing your workflows for splitting double paged PDFs. You guys are a lifesaver! I have been doing this manually in Adobe Acrobat for eons - and cursing every moment of it. Can't thank you both enough!!
  23. Like
    Jasondm007 got a reaction from dfay in PDF Actions (so far only splitting double pages)   
    @dfay & @xilopaint - Thank you both so much for sharing your workflows for splitting double paged PDFs. You guys are a lifesaver! I have been doing this manually in Adobe Acrobat for eons - and cursing every moment of it. Can't thank you both enough!!
  24. Like
    Jasondm007 reacted to GuiB in Allow App-specific Hotkeys to Use the Same Key Combinations   
    Hey, a little late, but wanted to join the party since this is one of my most wanted feature requests (I think we talked about this multiple time ago...)! Actually, it would be great to remove the restriction completely and allow to assign the same hotkey in any workflow and make a popup to list the possible list of actions when invoking a hotkey which is assigned to multiple actions (like @Jasondm007 is mentioning), but being able to use the same hotkey only in app-specific situation would be a great step!
     
    I've been assigning some of my hotkeys from behind (by editing the workflow "info.plist") or using BetterTouchTool or Hammerspoon to get around this.
     
     
    I think the idea to pop a list of the actions that are linked to the invoked hotkey would make it work and would clearly show that we have a conflict, but the wanted action could still be invoked from the popup list. Maybe to make it even clearer, you could add a little mention on the popup that specifies that multiple actions were found using the invoked hotkey...
     
    For the popup, what I'm thinking is to just pop the normal Alfred search UI, but with the list items set to the conflicted actions (so we can invoke one using CMD+1 or CMD+2 ... or writing its title to filter the list). The problem I'm thinking is how can we get a title, but the Hotkey object doesn't have one... maybe you could use the Workflow Title and with that, maybe you could add a "Label" field to the Hotkey object or use an Object Note as title? With that you could set the item icon to the Workflow icon or add an icon field to the Hotkey object... Maybe those new fields could be grouped and mention that they would be used in case of hotkey conflict.
     
    I know this may be quite some work to implement the feature, but I think this would be worth it and I think it would actually make it less confusing to every user (new and more experimented ones; I think there were multiple messages here on the forum regarding the confusion of a user regarding why it couldn't use a specific key combination and then later found out it was already used somewhere else). Also, this could be used to implement some kind of modal keybinding.
     
    To give some more idea... To make it easier to fix those conflicted hotkeys, when on this popup you could set a modifier key that would jump to the selected hotkey object node in its workflow. This way we won't have to search too much to find where it was set.
     
    So again, just my +1
     
     
  25. Like
    Jasondm007 reacted to GuiB in Open Alfred file actioning from CLI   
    @Jasondm007, yes that would be great to be able to call directly the File Action, but at the moment I think the only way is doing GUI scripting using AppleScript like @deanishe said or you can implement your own version of the built-in actions using a shell script or AppleScript.
     
    For the Open With, if you want to avoid the GUI scripting route, you can easily do it using a shell script like:
     
    open -a "ApplicationName" /Path/To/File  
×
×
  • Create New...