Jump to content

Tyler Eich

Member
  • Posts

    628
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Tyler Eich

  1. I've confirmed this. I'll submit a bug report as soon as possible I've submitted a bug report, as I don't believe this is the appropriate behavior.
  2. I do agree that there should more flexibility in displaying data directly in Alfred. That said, I don't think results are the place to do it. Perhaps a new panel could be added to Alfred? Spotlight opens a QuickLook panel of the item you have selected; that concept could be extended to Alfred. This could be used for Dictionary definitions, severe weather alerts, or any number of lengthy-text results.
  3. No, that would literally output "/tmp/ldapres.xml". Just off the top of my head, this should work (assuming /tmp/ldapres.xml is in the Alfred-friendly format @deanishe explained): sys.stdout.write( open('/tmp/ldapres.xml').read() ) If /tmp/ldapres.xml IS NOT in Alfred's XML format, you would need to load the XML, process into Alfred's format, and return that instead. For example (after you've processed it and saved your variable as an XML string to alfred_xml): sys.stdout.write( alfred_xml.encode('utf-8') )
  4. Try this URL: http://www.booklooker.de/B%C3%BCcher/Angebote/titel={query} The '%C3%BC' is 'ΓΌ' encoded for use in URLs. The checkbox for UTF-8 encoding only applies to the value of {query}.
  5. Have you read David Ferguson's post about script filter feedback?
  6. Alfred comes with a workflow like this built into the Examples. Go to Alfred Preferences > Workflows > [+] button at bottom of list > Examples > Should I watch this movie? It will help you understand the basics of 'Default Web Search' and 'Open URL' actions, which will be the only things you should need for a workflow like the one you describe
  7. Let me make sure I understand your questions: You want to use a keyword to generate a predefined text response, but you want to skip Alfred's hotkey. You want to set up a snippet of text that can generate a text response that uses the contents of your clipboard automatically. If this is true, then these are some ideas for solving your issues: Alfred will not automatically inject text based on what you're typing; a tool like TextExpander is better for this purpose. That said, Alfred does have a Clipboard Snippets feature. If you are willing to type the Alfred Snippets hotkey (Cmd-Option-C by default), you could use Snippets to paste your response. Go to Alfred Preferences > Features > Clipboard > Snippets, then add your snippet. To access it, press your Alfred Snippets hotkey and type the name/keyword of your snippet. In a Copy to Clipboard workflow output, or in a Clipboard snippet, you can place {clipboard} wherever you want the contents of your clipboard to be inserted.
  8. In your item's XML, include this fragment: <icon type="fileicon">{{ path/to/the/app }}</icon> The type attribute is what really makes the difference here By the way, I made a workflow for getting version info from apps. Some of the code might be useful in your workflow
  9. If you want to run a script as a superuser, you can wrap your command in the following AppleScript: do shell script "kextunload -b foo.tun; kextunload -b foo.tap" with administrator privileges It will prompt for authentication. You can put this code in an NSAppleScript object or a Run Script object with the language set to 'osascript'. Jonas Eriksen posted this before I don't know of any way to completely bypass authentication, but this is a simple way to run sudo commands.
  10. It would be better if you found the original workflow topic on the forums and posted your issue there. For example, if you're using David Ferguson's Weather workflow, you should go to his Weather Workflow (with Conditions and Forecast) topic and hit 'Reply to this Topic' in the upper right. In your reply, state your issue, and David or other users will be able to help you
  11. No, the method Andrew recommended is more thorough and intensive. It will nearly always fix anything Alfred's reindexing button won't. Also, I made a workflow that runs the commands Andrew recommended. Enjoy
  12. For what it's worth, you don't need to use a Run Script action to open Alfred with a query. Hotkeys can handle this without any extra code:
  13. It sounds like you don't have the Powerpack installed. Workflows require you to have a Powerpack license
  14. Did you add your Exchange account to Contacts.app? Alfred uses the OS X Contacts API to search your address book; basically, if it's in Contacts.app, it should appear in Alfred.
  15. There's a simpler alternative if you just want to open the Google Drive search in Chrome. Add the 'Open default web search in specified browser' workflow from the provided templates: You'll then see a window similar to this: Double-click the first object to set your Keyword and the Title/Subtext you want to see when you enter that keyword. Save your changes. Double-click the second object. In the first drop-down menu, find and select 'Search Google Drive'. In the second drop-down menu, find and select 'Google Chrome'. Save your changes. That's it! Type your keyword followed by your search text, then hit enter. The Google Drive search page will open in Google Chrome
  16. Yes, the 'type' attribute is optional. Right now, it is used only to specify if a result is a file/folder or not. If your script filter is returning files as its results (like David Ferguson's Faves workflow), setting the type to 'file' will allow the user to interact with the result just like a file search result. They can add it to the buffer, Quicklook, activate the actions panel, etc.
  17. Try this code: xml = '<?xml version="1.0"?>' '\n' xml += '<items>' '\n' xml += '\t' '<item uid="whatever" arg="myResult">' '\n' xml += '\t' '\t' '<title>hallo</title>' '\n' xml += '\t' '\t' '<subtitle>who is there?</subtitle>' '\n' xml += '\t' '</item>' '\n' xml += '</items>' print(xml) Those 'EOB' strings turned out to be the culprit. They were making the XML invalid, and Alfred can't parse invalid XML. Say the word if you need more help
  18. I confirmed this behavior. Video demonstrating the bug. I'm not sure if it's a bug or an OS X anomaly. Alfred 2 v2.1.1 (227) on Mac OS X 10.9.1 (13B42). Replicated: YES
  19. You asked this question already. Could you please post a reply on the original thread?
  20. Yes, I can confirm this. I remove unnecessary modules for nearly every Python workflow I write. Each time, a different set is removed according to the workflow's needs.
  21. Have you tried assigning the Finder to all desktops? That way, Finder will be available regardless of which desktop you're on. From there, you can use Alfred to open Finder. You could simply type 'Finder', or you can create a workflow with a hotkey or keyword to launch Finder.
  22. The Alfred support site already has a cheat sheet. Is that what you're looking for?
  23. I replaced your \' with ' and everything works. Your XML was invalid because of the improperly escaped apostrophes. I recommend using a workflow library in your code. It will abstract all this escaping business and make it easier to interact with Alfred
  24. I think you misunderstood me. I do not have the new debugging feature in my installation of Alfred. I don't have any special access to releases. I did, however, compare what I saw in the image on Twitter to an actual syntax error from Terminal. They matched, so I concluded the errors in the image were pulled verbatim from actual error outputs. P.S. I'm sure you already know this, but for the sake of completeness, the code above returns a 'DivideByZero' traceback (obviously) when run from the Terminal
×
×
  • Create New...