Jump to content

Tyler Eich

Member
  • Posts

    628
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Tyler Eich

  1. I created a workflow that uses the keyword 'test' to launch a NSAppleScript process that displays Alfred with the text 'test ' & the entered query, thus allowing a loop. If I hold enter, the loop will continue for several seconds until it finally uses a fallback search (which did not have a query). When I open Alfred again, he looks like this: The workflow was merely a stress test for Alfred; I can't imagine any place this would be an actual issue. There was no Console output. Alfred v2.0 (141) on OS X 10.8.2. Replicated: yes
  2. Good catch! I went a little crazy with UTF8 encoding The original download link has been updated
  3. The queries on your AppID are probably from when the workflow validated your ID. I'm not sure what could be causing your issue . I deleted my tylereich.wolframalpha folder and it was immediately recreated when I launched the script. It could be an issue with David Ferguson's Workflows class, or with PHP itself, but I sincerely doubt either is at fault. I doubt this will help, but could you try running the script from the terminal? Open Alfred's preferences > workflows, right-click the Wolfram|Alpha entry, 'Show in Finder', and locate the script called 'wolfram.php'. Open Terminal and type 'php -f ', drag 'wolfram.php' into Terminal to load its path, then type '-- "hello world"'. Hit enter and see what comes out. If you need help, let me know
  4. Could you check '~/Library/Application Support/Alfred 2/Workflow Data/tylereich.wolframalpha/settings.plist' and see if your API key is stored within? If you need help reading the .plist file, let me know
  5. I don't use smcFanControl, but Google is telling me there's a command line app inside the package. Alfred can use command line apps, so this should be possible (if all my research is correct). Here's a link to an Apple Support discussion on the topic: https://discussions.apple.com/thread/2528945?start=15&tstart=0
  6. I know exactly what you mean! I wish the script would run faster, too. Wolfram|Alpha is a bit sluggish, and launching the script with only a few characters is wasteful. Right now, the workflow waits until at least three characters have been entered (as suggested by David Ferguson). I would love it if I could throttle the script, but I can't. Andrew might add a feature like this later on; it has been suggested by a few people (http://www.alfredforum.com/topic/535-throttle-script-filters/). Thanks for the feedback, and I'm glad you like it!
  7. I wanted an easy way to compress files from Alfred, so I wrote a quick workflow to do it. It can compress a single file or folder to .ZIP, .TAR.GZ, .TAR.BZ2, and .DMG archive formats. Support for multiple files/folders may be added later, if I can figure it out Any and all feedback is welcome. Enjoy Download Here
  8. Just tried it with a new AppID; I tried it right away and it didn't work. I tried it again after about 3 minutes and it worked. It uses this code to validate the AppID: $q = $argv[1]; $id = urlencode($q); $xml_string = $w->request("http://api.wolframalpha.com/v2/validatequery?input=hello+world&appid=$id"); Try loading 'http://api.wolframalpha.com/v2/validatequery?input=hello+world&appid=YOUR-ID-HERE' in a browser. If you get an 'error=true' message, it's something on Wolfram|Alpha's side; maybe it takes a few minutes for the AppID to register. Thanks!
  9. I converted David Ferguson's Wolfram|Alpha extension to a workflow (and made some tweaks along the way ) It requires you have an AppID of your own (get one here). Note: Make sure you wait a few minutes before entering the code; Wolfram|Alpha's servers seem to take a moment to register the AppID. It provides feedback with the answer and input interpretation. If you action an item, it will output all the available information to Growl. Pressing ⌥↩ will copy the answer to the clipboard; ⌘↩ will open your query in Wolfram|Alpha (in the default browser). Here's a picture of the workflow editor: Here's what it looks like in action: Hope you like it! Download Here Update (May 15, 2013): Fixed another bug that prevented saving of AppID Update (March 5, 2013): Fixed bug that prevented the workflow from saving AppID on certain setups Update (Feb 25, 2013): Fixed garbled text issues, added 'Selection is OS X' argument to hotkey
  10. I also noticed that the cache won't be written to unless the file it is attempting to write to exists already. If it doesn't exist, it will prepend the path to the data folder, which can be undesirable. My original code: $cache = $w->cache().'/cache.xml'; $w->write($xml_string, $cache);I've added some defensive code (I thinks that's what it's called) to create a 'cache.xml' if it does not exist already:$cache = $w->cache().'/cache.xml'; if(!$w->read($cache)){ file_put_contents($cache,''); } $w->write($xml_string, $cache);That fixed it for me .Perhaps a similar function could be included in the code? I was thinking of an optional logic switch for write() that disables its path logic: $w->write($content, $path, false); //Do not use logic; just write the file $w->write($content, $path, true); //Use logic to determine appropriate file path $w->write($content, $path); //Use logic to determine appropriate file pathOr maybe letting cache() and data() optionally accept arguments that allow files to be written to the cache, instead of just returning the path to it?$w->cache($content,$file); //Writes file to ~/Library/Caches/ ... /bundle.id/$file $w->cache(); //Returns path to cache (like it does now)Please forgive my PHP; I learned by reading Alfred extension source code
  11. Thanks for the update . Write operations are performing as expected. Now I have another problem: I can't get it to automatically detect my bundle id. My 'workflows.php' is in the '~/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.really-long-uid' folder. I checked the info.plist and it does contain the bundle id. In the meantime, I'm providing the bundle id manually: $w = new Workflows('my.bundle.id'); Thanks!
  12. In Finder, if a file name is longer than the column containing it, it is truncated with a '…' in the middle, so you can see the file extension and other important data found at the end of the name. Alfred puts the ellipsis at the end of the column, so I can't tell whether I'm looking at com.runningwithcrayons.Alfred or com.runningwithcrayons.Alfred-2 Just a suggestion
  13. Yes, once I found it. I had a hard time finding your new blog (dferg.us), but the documentation was easy to understand.
  14. No worries Its benefits and ease of use FAR outweigh any issue(s?) it may have. Thanks for your hard work!
  15. I have been reading the documentation for David Ferguson's workflow class (awesome work, BTW). I can't figure out how to write to the cache. I have tried $xml_string = 'Lorem ipsum dolor sit amet'; $path = $w->cache().'/data.xml'; $w->write($xml_string, $path); which wrote nothing. Then I tried $xml_string = 'Lorem ipsum dolor sit amet'; $w->write($xml_string, '/data.xml'); which wrote to ~/Library/Application Support/Alfred 2/Workflow Data Then I tried $xml_string = 'Lorem ipsum dolor sit amet'; $w->write($xml_string,'data.xml'); which wrote to ~/Library/Application Support/Alfred 2/Workflow Data/my.bundle.id Any suggestions?
  16. I think you could use a file filter with a search scope of the client folders. Would that work?
  17. Is there a recommended size for workflow icons? I noticed Alfred's resources use 128x128 pngs
  18. I activated Quick Look, changed spaces via 3-finger swipe (which hid Quick Look), and returned to the original space. Alfred was still visible on that space and would not toggle when I pressed Cmd-Space or Esc. I had to click on him to restore proper focus behavior. Alfred v2.0 (131) on OS X 10.8.2. Replicated: Yes
  19. Is this possible without external apps or modifications? I've only ever heard of third party apps letting you do that.
  20. I use Cmd+Opt+Ctrl+[letter]. It takes two hands, but its easy to remember 'C' for Chrome, 'S' for Safari, 'E' for Reeder, 'T' for Textmate, etc.
  21. If I remember correctly, Notification Center doesn't offer that kind of control on a per-notification basis. You can set all Alfred's notifications to be 'Alerts' instead of 'Banners'; then you will have to manually dismiss every notification. Growl, on the other hand, is VERY customizable and offers a 'sticky' setting for each message. I would also love it if Alfred launched a script on clicking a notification (Growl or NC). For Growl, even a simple URL callback would be great
  22. The 'Advanced' tab of a File Filter object lets you ignore specific kinds of files. For example, to ignore .zip files, you would set a field with the options: Metadata: 'kDMItemKind' NOT: true Value: 'Zip Archive' (because that's what Finder calls .zip files, found under a .zip file's "Kind" description) This may or may not be what David and/or Andrew mentioned earlier Alfred 2.0 (112) on OS X 10.8.2
×
×
  • Create New...