Search the Community

Showing results for tags 'feedback'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

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

Categories

  • New Features
  • Other

Found 9 results

  1. In a multi-step workflow, one where Arg and Var objects separate Filters and are used to pass state from one step to the next, is there any way to go to the previous step without starting over from the beginning? For example, in the Simple Todo List project, when the user types "todo some new task" and presses Enter, the workflow moves to a Filter object, using the output of the initial script filter as input. Is there an easy way to return to the previous state, where Alfred is back on the previous Script Filter with a query of "todo some new task"? I know you can just re-open Alfred and press "up" to use history, but that doesn't work so well if you're 2 or 3 steps into a more complex workflow.
  2. Hey guys, Say I make a Script Filter and link it to 4 script actions that each perform a different function, but each action needs a different input from the Script Filter, and this is where the problem begins, because the "arg" attribute can hold only one value which will work with just 1 of the 4 actions Right now the only workaround to this problem is to give the "arg" attribute a separated list of multiple values, and then each action would need to parse the input and search for its piece of data, but it's too much parsing and splitting involved.. My opinion is that we should have some freedom in the XML attributes of the feedback results by letting us define our own attributes in a result and Alfred would automatically send those attributes as individual parameters to the "alfred_script" function, as well as individual {attribute_name} to other predefined actions. For example, script filter would generate this xml result: ... <item uid="rdioartist" arg="r96664" valid="yes" autocomplete="Incubus" artistiname="Bjork" track="All is full of love"> ... And we, the programmers, would then use the following in script action: on alfred_script(arg, artistname, track) -- we use the parameter that is needed for a specific action end alfred_script [later edit]: a big problem with the current design is when you link a script filter to multiple actions AND a Notification action, because inside the Notification action we can't split the separated list of values of the "arg" attribute, and setting the arg attribute to a single value would make the other actions useless So with my suggestion above we would type something like {aristname} or {track} inside the Notification action
  3. The Format ** This will be an evolving document. Check here for updates and new documentation. ** There is also an XML format example available in Alfred 2 preferences. To see it, open Alfred Preferences, navigate to Workflows. Click the + i nthe bottom right corner of the installed workflows list, select Examples->Script Filter XML format. Result feedback is generated by returning an XML string back to Alfred from a Script Filter item in your Workflow. Script Filters are the only way to pass feedback to Alfred. The following is an example XML string that would be returned to Alfred. <?xml version="1.0"?> <items> <item uid="rdioartist" arg="r96664" valid="yes" autocomplete="Incubus"> <title>Incubus</title> <subtitle>Artist</subtitle> <icon>rdio-artist.png</icon> </item> <item uid="albumart" arg="/Users/user/Documents/album.jpg" type="file"> <title>Incubus Album Art</title> <subtitle>Album Art for Science</subtitle> <icon type="filetype">public.jpeg</icon> </item> </items> Results will be returned as a list of "items", with each one being an "item" inside. Each item has several arguments and pieces of information associated with it. Item Attributes uid (optional in Alfred 2.0.3+) The uid attribute is a value that is used to help Alfred learn about your results. You know that Alfred learns based on the items you use the most. That same mechanism can be used in feedback results. Give your results a unique identifier and Alfred will learn which ones you use the most and prioritize them by moving them up in the result list. As of Alfred 2.0.3, this attribute is now optional. If no uid is provided, Alfred will simply generate a UUID. This will allow you to maintain a specific order of generated feedback. Previously, the uid (if not unique for each result) would be added to Alfred's knowledge and would be prioritized in later executions. arg The arg attribute is the value that is passed to the next portion of the workflow when the result item is selected in the Alfred results list. So if you pressed enter on the sample item above, the value 'r96664' would be passed to a shell script, applescript, or any of the other Action items. type The type attribute allows you to specify what type of result you are generating. Currently, the only value available for this attribute is file. This will allow you to specify that the feedback item is a file and allows you to use Result Actions on the feedback item. valid ( optional - Defaults to 'yes' ) The valid attribute allows you to specify whether or not the result item is a "valid", actionable item. Valid values for this attribute are 'yes' or 'no'. By setting a result's valid attribute to 'no', the item won't be actioned when this item is selected and you press Return. This allows you to provide result items that are only for information or for help in auto completing information (See autocomplete flag below). autocomplete ( optional - Only available when valid = no ) The autocomplete attribute is only used when the valid attribute has been set to 'no'. When attempting to action an item that has the valid attribute set to 'no' and an autocomplete value is specified, the autocomplete value is inserted into the Alfred window. When using this attribute, the arg attribute is ignored. Elements title The title element is the value that is shown in large text as the title for the result item. This is the main text/title shown in the results list. subtitle The subtitle element is the value shown under the title in the results list. When performing normal searches within Alfred, this is the area where you would normally see the file path. icon ( optional - If not icon value is available, the icon will be blank. If the icon element is not present, a folder icon will be used ) The icon element allows you to specify the icon to use for your result item. This can be a file located in your workflow directory, an icon of a file type on your local machine, or the icon of a specific file on your system. To use the icons of a specific file type or another folder/file, you must provide a type attribute to the icon item. Example: <icon type="fileicon">/Applications</icon> - Use the icon associated to /Applications Example: <icon type="filetype">public.folder</icon> - Use the public.folder (default folder) icon
  4. Another quickie from my own personal self, a Things workflow for adding tasks that also, thanks to Alfred's feedback system, searches them. I've been pestering Cultured Code to add this to the Quick Entry panel for ages, since I have a tendency to add one task five times (the number of incomplete "Watch and return Netflix DVDs" tasks I have floating around at any given time is absurd), but now Alfred will handle it for you! Just enter "things" to see a list of all projects, areas, and tasks; keep typing to start entering a task using the plug-in syntax (see below) while searching through pre-existing tasks. Select any item to show it in Things. You can also skip searching new items by adding a plus sign to your input (e.g., "things +Get this done"). The format for new tasks is as follows: #tag1 #tag2 name [project/area] ::note >duedate …with duedate specified in the format MM/DD/YYYY. Give it a try and let me know if anything else breaks!
  5. I've been working on this for a while, and although I've gotten close, I haven't achieved complete success. My goal is basically to have the workflow script generate the workflow. I'd like to have a single top-level keyword and have the script generate everything else dynamically. This mostly works, but implementing Alfred's "waiting for input" subtitle behavior is proving difficult. The closest I've come up with is having the script filter spawn off a separate process to do the long action and return an item with the "waiting" subtitle. The secondary process will update Alfred when the process is finished via AppleScript. Telling Alfred to perform a new query via Applescript opens a new window, which has two downsides: It causes an annoying flicker when the current window closes and the new one opens If the user closed Alfred, Alfred is going to mysteriously pop open again when the subprocess completes. Is there a better way to do this, or is there some chance that Alfred might add support for updating the currently open Alfred window via Applescript?
  6. Attached is a simple Wikipedia auto complete workflow. -Download: http://d.pr/f/no3O For those like myself who prefer scripting in Python, the following class makes generating feedback easy -View/Download: http://d.pr/f/GMO8 Example Usage: from alfred import Feedback fb = Feedback() fb.add_item("Hello World", subtitle="Simple Greeting") fb.add_item("Foo", subtitle="Bar", icon="foobar.icon", arg="foobar") print fb Enjoy
  7. Hey there Andrew! I was just rewriting one of my workflows when I had a sudden thought about what could be a neat feedback feature. If it's doable, it might be a little extra interface sugar if a worker of flow could flag a feedback item as the one that's automatically selected. For example, I'm outputting a list of Finder flag colors, but would like to be able to imply that the file is already red. Rather than adding another informational item or something along those lines, it would be nifty if I could add something like default="yes" to the red item. I don't have any kind of sense of how complex that would wind up being, since I know Alfred always starts from the top of the results list, but thought I'd throw it out there.
  8. This workflow demonstrates several feedback scenarios and can be used as a template for your AppleScript projects. I will maintain an updated copy of this post on my blog: http://www.johneday.com/617/generate-feedback-in-alfred-2-workflows Overview: To generate feedback in Alfred, we use a Script Filter to pass a query to the xml.scpt AppleScript. The script then processes the query and returns a properly formatted XML string containing information for each item to be displayed. After you import the Generate Feedback workflow, launch it with the gf keyword to view my five examples. To reveal the xml.scpt you will need to edit, open the gf Script Filter and click the Open workflow folder button at the bottom of the window. Basic Usage: Add each item you would like to be displayed in your workflow to the itemList by passing a record containing the required labels to the xmlItem handler. For an in-depth description of each attribute, I have included pieces of David’s tutorial in the script’s comments. on run argv -- coerce the argv list to text set query to argv as text -- create an empty list to hold the items set itemList to {} -- Feedback item 1 set end of itemList to xmlItem({uid:"My uid", arg:"My arg", title:"My Title"}) -- Wrap the elements of the list with a declaration and return the list to Alfred return giveFeedback(itemList) end run xmlItem Handler Required labels: {uid:"My uid", arg:"My arg", title:"My Title"} Optional labels: subtitle:"My Subtitle" valid:"no" autocomplete:"Autocompleted text" icon:"icon.png" icon:"public.plain-text", iconAttribute:"filetype" -- iconAttribute must be used with icon icon:"/Applications", iconAttribute:"fileicon" -- iconAttribute must be used with icon Advanced Usage: Characters < > & " need to be escaped properly for XML. To insert items that may contain these characters, pass the string to the clean handler along with a true/false value to remove leading and trailing whitespace. clean(" Title with leading whitesplace & < > \" characters, trimming true", true) Alfred uses the uid attribute to learn which results are selected the most and then uses this information to sort your feedback. If you would like to manually arrange the returned items, use the uuid handler to generate a unique uid. In Alfred’s next release (after 2.0.2), this issue will be resolved and the item UID attribute will be optional. uid:uuid() Along with the workflow, I have included a list of file types that may be used as values for the icon label when paired with iconAttribute:”filetype”. See http://imgur.com/a/0zXVX for the corresponding icons.
  9. This is best explained with an example: The Amazon Suggest and Google Suggest workflows work fine on fast internet connections. On a slow connection however, it can take a noticable amount of time to load the suggestions. To make those Workflows more usable, i tried to alter them to output the input value as first feedback item, and do that before any connection is even made. The problem now is, that the output of a script is only read once, when the script finished executing. This python script: import time xml = """ <items> <item uid="0" arg="~/Desktop" valid="YES" autocomplete="Desktop" type="file"> <title>Desktop0</title> <subtitle>~/Desktop</subtitle> <icon type="fileicon">~/Desktop</icon> </item> """ print(xml) time.sleep(5) xml = """ <item uid="0" arg="~/Desktop" valid="NO" autocomplete="Desktop" type="file"> <title>Desktop1</title> <subtitle>~/Desktop</subtitle> <icon type="fileicon">~/Desktop</icon> </item> <item uid="0" arg="~/Desktop" valid="YES" autocomplete="Desktop2" type="file"> <title>Desktop2</title> <subtitle>~/Desktop</subtitle> <icon type="fileicon">~/Desktop</icon> </item> </items> """ print(xml) outputs all items, but does so only after 5 seconds, while i think the expected behaviour would be to output the first item immediately, and then the other ones after 5 seconds. A related problem I have is that when a script outputs multiple <items> groups, only the first one is processed. If Alfred would only read the last one, and combined with the previous problem, a script could also change feedback items while it is running.