Jump to content

Search the Community

Showing results for tags 'scriptfilter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
    • Advanced Tips & Tricks
  • Alfred Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting
  • Alfred 5 Early Access
    • Alfred 5 Early Access


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 13 results

  1. macOS 12.2.1 Alfred 4.6.3 [1284] Here's an example Workflow to illustrate the (bug?) https://github.com/luckman212/alfred_bugs/blob/main/uid test.alfredworkflow.zip?raw=true Type "uid x" to invoke it, then try actioning the 2nd or 3rd item (they are all set to valid: false). Now, if you type "uid x " (note extra space at the end!) the items maintain the correct sort order. Here's a video... https://user-images.githubusercontent.com/1992842/153678417-f6c2174b-f936-43d9-8193-e33f5ba3eb0b.mp4
  2. to create Alfred ScriptFilter results in Swift. the code: https://github.com/godbout/AlfredWorkflowScriptFilter if you care about the why, a bad blog post: https://sleeplessmind.com.mo/news/alfred-workflow-scriptfilter-another-one/ it's probably missing some stuff as it's built mainly for my current needs, so don't hesitate to bitch and i'll see what i can do!
  3. Hi Everyone, I'm trying to modify the Searchio workflow a bit to suit my needs and facing some issue where I have to press enter trigger the script filter What I want: - When I enter "yts" without args and press enter, it opens YouTube. When i enter "yts" and provide an arg, it should start search via searchio's script and display results. With my changes, the 1st part works great with a conditional, but when I provide an arg after "yts" I have to press a second enter to display results. Is there way I can make it work without having to press enter to show results? (I tried inducing a fake enter via a script in between the keyword and script filter, but that didn't work either) Later, I realized that I'd need to trigger the script filter directly with a keyword, but with that, it kept opening youtube from the script filter: ``` if [ -z $1 ] then open "youtube" else ./search youtube-us "$1" fi ``` Of course, since the arg is always null as soon as i enter the keyword. Can anyone please help with this? Modifed workflow: https://www.dropbox.com/s/1abqmspjfd3zobr/Searchio!.alfredworkflow?dl=0
  4. User can copy content when select item and press ⌘ C, I want to post a notification. how? Any trigger to achieve it.
  5. How do I return multiple items as output of a script filter? Upon execution of the script, I'd like to output something immediately. After let's say 5 sec/successful network call, I'd like to append some more results. I'm trying to run something like this: This is what's happening: After 5 sec, I see Desktop in alfred search results. This is what's I'm expecting to happen: Desktop should be appearing immediately in alfred search results. After 5 sec, Downloads should appear below Desktop. import time xml1=""" <?xml version="1.0"?> <items> <item uid="desktop" arg="~/Desktop" valid="YES" autocomplete="Desktop" type="file"> <title>Desktop</title> <subtitle>~/Desktop</subtitle> <icon type="fileicon">~/Desktop</icon> </item> </items> """ print(xml1) time.sleep(5) xml2 = """ <?xml version="1.0"?> <items> <item uid="downloads" arg="~/Downloads" valid="YES" autocomplete="Downloads" type="file"> <title>Downloads</title> <subtitle>~/Downloads</subtitle> <icon type="fileicon">~/Downloads</icon> </item> </items> """ print(xml2)
  6. for example "quicklookurl":"file:///Users/qhe/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cn.alanhe.giphy/1.png" but it's ok in /Users/qhe/Pictures/1.png Alfred Version: 4.3 Mac Version: 10.15.7
  7. https://www.alfredapp.com/help/workflows/inputs/script-filter/json/
  8. Hello there. To build cleaner workflows I needed to use some of the new fields found in Alfred 3.4.1 and 3.5. I usually use the fantastic package from Joe Tannenbaum to build my workflows but it's not updated and its fluent api is starting to show its limitation with the new nested fields. So I build my own. I started using it to build the v2 of my Alfred Time package and I'm quite pleased with it so I'm thinking, if you need to build workflows that handle the new nested field, you might want to have a look at my workflow. If not, Joe's package might have a nicer API. https://github.com/godbout/alfred-workflow-php Have fun, and be productive with Alfred!
  9. I'm working on a script to play music using MPD. I want to list available albums and have Alfred filter them rather than doing the filtering myself in a script filter. But when I check the "Alfred filters results" check box, the result is an empty list regardless of what I type: If, on the other hand, I uncheck that box, I get a list of albums as expected, but I can't type to filter them: Here's my code, in Python. It's really not very complicated: from __future__ import unicode_literals from __future__ import print_function import json import os import subprocess import sys MUSIC_DIR = '/Users/Shared/iTunes/iTunes Media/Music' FIND_CMD = [ '/usr/local/bin/mpc', 'list', 'album' ] def make_item(album_name): return dict( title=album_name, uid=album_name, valid=True, arg=json.dumps({'album': album_name}), icon='icon.png', autocomplete=album_name, ) def main(): print(json.dumps({ 'items': [ make_item(item) for item in subprocess.check_output(FIND_CMD).decode('utf-8').split('\n') if item.strip() ] })) if __name__ == '__main__': sys.exit(main()) Can anyone tell me what I might be doing wrong?
  10. Hello, Im rewriting my old alfred 2 workflows using great alfred 3 json api and it is difficult to understand what icon types I can use - https://www.alfredapp.com/help/workflows/inputs/script-filter/json/- it is not clearly described there(( "icon": { "type": "fileicon", "path": "~/Desktop" } - What other icon types I can use? Can I load icons using url? (I know that was impossible in alfred 2) or I should use something like https://github.com/sananth12/ImageScraper ? this is my old workflow preview I use it not only for movies but for parsing dynamic web content and an ability to load images using url and dynamicly resize them would make my life much easier - If it is not possible it is ok - I just wanted to check in case I missed it
  11. Newbie question, and maybe I'm missing something, but does Alfred not filter the results of a script filter based on arguments? I have a fully functioning filter, but it seems odd that Alfred doesn't filter the results based on the value of the argument. For example, if I have a script filter with the keyword "Press", requiring an argument, and the items "one","two","three", I'd expect that typing "Press o" would limit the results to "Press one", where typing: "Press t" would limit the results to "Press two" and "Press three" I've tried both populating and omitting the uid field, to no effect, though I do understand that this field is primarily for "learning". Am I doing something wrong, or is this expected behavior?
  12. Hey Guys, I was playing around with the Script Filter XML a bit and now I have the following script, which does not work, but I cant tell why: cat << EOB echo "<?xml version='1.0'?>" echo "<items>" for line in $(gpg --list-keys | grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b") do echo "<item uid='$line' arg='$line'>" echo "<title>$line</title>" echo "</item>" done echo "</items>" EOB Strange thing is: When I execute the script in my bash an copy the output as xml in the ScriptFilter, everything works fine. I suspect escaping to be the problem, but can not get it to work... Any ideas?
  13. Is it possible to have the text '{query}' as part of a title in Alfred's results? I have a test worflow, that uses the ScriptFilter to output items. Keyword is test and no arguments are required. The XML is being generated via a sh call to a file called XML.sh, which just cats out an XML. There are two items in the result, each with a title of "this is a test for '{query}'" The first item has an arg value = 'hello', and second item has arg value = 'world'. I want to have two items shown in Alfred with the text this is a test for '{query}' but {query} gets replaced with the text of the arg of each item. Is there no way to print out '{query}' as text? Also, if I just cat out the XML directly in the ScriptFilter, '{query}' will be replaced by '', because the script filter itself does not need any arguments. Sample workflow
  • Create New...