panrubius Posted April 14, 2013 Share Posted April 14, 2013 I was working on converting this very same script this morning, so I thought I'd better come and check I wasn't reinventing the wheel. And low and behold I find this post. Excellent work that man, excellent work! Tyler Eich 1 Link to comment
parekh Posted April 16, 2013 Share Posted April 16, 2013 (edited) Great workflow! The only problem is that pressing return doesn't do anything. I expected it to take me to the search result on Wolfram Alpha, but it actually does nothing. Also, it doesn't seem to understand when you start / stop typing. It recalculates the search results in a rather inefficient manner. Edited April 16, 2013 by parekh Link to comment
Tyler Eich Posted April 16, 2013 Author Share Posted April 16, 2013 Great workflow! The only problem is that pressing return doesn't do anything. I expected it to take me to the search result on Wolfram Alpha, but it actually does nothing. Hitting ⌘-[enter] will always open the search at Wolfram|Alpha's website. When you hit [enter] by itself, the workflow sends the output to Growl; if you don't have Growl, it won't work as expected. Here's what to do if you want [enter] to open Wolfram|Alpha's website: Open Alfred Preferences (open Alfred, hit ⌘-[comma]), navigate to Workflows > Wolfram|Alpha (in the left sidebar), and click it. Double click the connection to the 'Open URL' action and change the 'Action Modifier' to 'none' You can delete the Growl notification if you don't have Growl installed. Here's a picture to help you out: Link to comment
parekh Posted April 16, 2013 Share Posted April 16, 2013 Hitting ⌘-[enter] will always open the search at Wolfram|Alpha's website. When you hit [enter] by itself, the workflow sends the output to Growl; if you don't have Growl, it won't work as expected. Here's what to do if you want [enter] to open Wolfram|Alpha's website: Open Alfred Preferences (open Alfred, hit ⌘-[comma]), navigate to Workflows > Wolfram|Alpha (in the left sidebar), and click it. Double click the connection to the 'Open URL' action and change the 'Action Modifier' to 'none' You can delete the Growl notification if you don't have Growl installed. Here's a picture to help you out: Thank you so much for your response. That definitely solves the first problem. I would really appreciate it if you could perhaps look into the other problem mentioned. It was brought up earlier in this thread, and your response was that you are unable to throttle the script filters and prevent them from firing after every keystroke. But how come other workflows (such as this one: Wikipedia workflow (alternate))) don't face the same problem? I don't mean to challenge you; I'm just curious. Thanks once again for this great workflow. Link to comment
Tyler Eich Posted April 16, 2013 Author Share Posted April 16, 2013 Thank you so much for your response. That definitely solves the first problem. I would really appreciate it if you could perhaps look into the other problem mentioned. It was brought up earlier in this thread, and your response was that you are unable to throttle the script filters and prevent them from firing after every keystroke. But how come other workflows (such as this one: Wikipedia workflow (alternate))) don't face the same problem? I don't mean to challenge you; I'm just curious. Thanks once again for this great workflow. Other workflows (like the Wikipedia, Amazon, and Google Suggest) use different APIs than Wolfram|Alpha. You see, Wikipedia, Amazon, and Google are very quick to respond when you send a request to their servers. The Wolfram|Alpha API is a bit sluggish, mainly because it does more processing of your request and sends real answers back (instead of suggested search queries). All of this adds up to a notable lag between your keystrokes and the appropriate results. I wish I could do something about this, but I can't Hope this helps parekh 1 Link to comment
TheNuffimNom Posted April 17, 2013 Share Posted April 17, 2013 I don't have the settings.plist file for whatever reason. This leads to an error every time I try to set my AppID (Which I have). Link to comment
chrisbaptie Posted April 23, 2013 Share Posted April 23, 2013 Hello! I also have this issue of no settings.plist file. I have tried a few combinations of deleting the tylereich.wolframalpha folder and relaunching / enabling / deleting & reinstalling Alfred and the workflow, no cigar. Link to comment
Tyler Eich Posted April 23, 2013 Author Share Posted April 23, 2013 Hello! I also have this issue of no settings.plist file. I have tried a few combinations of deleting the tylereich.wolframalpha folder and relaunching / enabling / deleting & reinstalling Alfred and the workflow, no cigar. Hello! Could you try running the 'setappid.php' file in your Terminal? Right click on the 'Wolfram|Alpha' entry and click 'Show in Finder'. Find 'setappid.php' in the resulting Finder window. Open Terminal and type: php -f <drag the setappid.php file here> -- 'test' (do not include < or >) Hit return and let me know what comes out Thanks for your patience chrisbaptie 1 Link to comment
chrisbaptie Posted April 25, 2013 Share Posted April 25, 2013 Hello! Could you try running the 'setappid.php' file in your Terminal? Right click on the 'Wolfram|Alpha' entry and click 'Show in Finder'. Find 'setappid.php' in the resulting Finder window. Open Terminal and type: php -f <drag the setappid.php file here> -- 'test' (do not include < or >) Hit return and let me know what comes out Thanks for your patience Okay I gave that process a go, the output in Terminal was 'test'. I did get a settings.plist file at this point describing my AppID as 'test'. I tried deleting the .plist file and going through the normal process but had the same original outcome. I tried the above Terminal command replacing 'test' with my AppID string and hey presto, working a charm! Thanks for your help, appreciated! Link to comment
benchinn Posted May 10, 2013 Share Posted May 10, 2013 (edited) This works great when I use the hotkey but I can't get this to run when entering the keyword. It brings up the WolframAlpha workflow but when I add an argument it goes to the default search action. I'm having this trouble with other workflows that are initiated with a Script Filter. Anything I can do? Edited May 10, 2013 by benchinn Link to comment
Tyler Eich Posted May 11, 2013 Author Share Posted May 11, 2013 This works great when I use the hotkey but I can't get this to run when entering the keyword. It brings up the WolframAlpha workflow but when I add an argument it goes to the default search action. I'm having this trouble with other workflows that are initiated with a Script Filter. Anything I can do? The script won't provide valid feedback until you enter at least three characters. For the first two characters (and a few seconds after that, while the script is asking Wolfram|Alpha for answers), you will see fallback results. Could you try highlighting the Wolfram|Alpha entry, pressing tab, and then typing 'Hello World'? You also might wait a few seconds; it takes a long time for Wolfram|Alpha to respond. Let me know if you need more help Link to comment
jiku Posted May 11, 2013 Share Posted May 11, 2013 (edited) I was also getting a Warning: Invalid argument supplied for foreach() in ... notification. Not using Dropbox. An empty tylerreich.wolframalpha folder was made in the Workflow Data folder. I made a settings.plist there and added appid as a string. It doesn't complain about a missing appid anymore, and it seems I can use the appid keyword now without getting that notification. Edited May 11, 2013 by jiku Link to comment
bpsooner Posted May 13, 2013 Share Posted May 13, 2013 Yep, I'm having the same problem. I'm a total newbe with Alfred 2 workflows … I don't know how to get a Wolfram Alpha AppID. Where do I get this AND where do I enter it in the workflow. I have registered & can sign in w/ the WA site. Thanks! bpsooner Link to comment
Tyler Eich Posted May 13, 2013 Author Share Posted May 13, 2013 I'm a total newbe with Alfred 2 workflows … I don't know how to get a Wolfram Alpha AppID. Where do I get this AND where do I enter it in the workflow. I have registered & can sign in w/ the WA site. Thanks! bpsooner David Ferguson made a very complete tutorial on getting an AppID. Ignore the last bit where he talks about going into Alfred extensions and editing PHP; my workflow will take care of that. You may have to wait a few minutes for this to work. Once you get the AppID, type 'appid {your appid here}' (without the { or the }). When the workflow says the AppID is valid, press enter. This will save your AppID and allow you to use the Wolfram|Alpha workflow Cheers Link to comment
benchinn Posted May 14, 2013 Share Posted May 14, 2013 Looks like I wasn't waiting long enough for the search to initiate. It would be nice if Alfred gave some indication that a workflow was in progress rather than reverting to the default search during loading. Link to comment
Tyler Eich Posted May 14, 2013 Author Share Posted May 14, 2013 Looks like I wasn't waiting long enough for the search to initiate. It would be nice if Alfred gave some indication that a workflow was in progress rather than reverting to the default search during loading. Alfred does allow a customizable 'Please Wait' text, which this workflow uses; a recent behavior change in Alfred changed what he does when nothing is returned by a script. David Ferguson suggested using a 3 character minimum query length before searching. My script is set to simply return nothing if the string is not >3 characters. Before, this would continue to show the 'Loading...' text. Now it is recognized as an invalid result and triggers a fallback. I don't want to remove the character requirement because that would slow things down a lot (search would be called on the first character, take 5 secs to load, and then process what you really wanted). I could return a single, invalid result that says you must type 3 characters..... Link to comment
bpsooner Posted May 15, 2013 Share Posted May 15, 2013 David Ferguson made a very complete tutorial on getting an AppID. Ignore the last bit where he talks about going into Alfred extensions and editing PHP; my workflow will take care of that. You may have to wait a few minutes for this to work. Once you get the AppID, type 'appid {your appid here}' (without the { or the }). When the workflow says the AppID is valid, press enter. This will save your AppID and allow you to use the Wolfram|Alpha workflow Cheers I tired entering 'appid … but Alfred started a google search on 'appid. What am I doing wrong? Link to comment
Tyler Eich Posted May 15, 2013 Author Share Posted May 15, 2013 I tired entering 'appid … but Alfred started a google search on 'appid. What am I doing wrong? If you didn't change the keyword in my workflow, I don't know what's wrong. Could you try reinstalling the workflow? https://raw.github.com/TylerEich/Alfred-Extras/master/Workflows/Wolfram%7CAlpha.alfredworkflow Link to comment
bpsooner Posted May 15, 2013 Share Posted May 15, 2013 If you didn't change the keyword in my workflow, I don't know what's wrong. Could you try reinstalling the workflow? https://raw.github.com/TylerEich/Alfred-Extras/master/Workflows/Wolfram%7CAlpha.alfredworkflow I entered in the Alfred 2 box "appid EYLW26-T5XLG56WVE" then Wolfram Alpha validated my AppID. But, in notifications I got this message"Wolfram | Alpha ID Saved Saved as 'Parse error in User/Dorsey/Library/Application Support /Alfred 2 … But, when I try to use the workflow, the next entry I make gets a response of "Please provide your WA AppID. I re-installed your workflow and still get this response. What should I try next? Thanks! Link to comment
Tyler Eich Posted May 18, 2013 Author Share Posted May 18, 2013 I entered in the Alfred 2 box "appid EYLW26-T5XLG56WVE" then Wolfram Alpha validated my AppID. But, in notifications I got this message"Wolfram | Alpha ID Saved Saved as 'Parse error in User/Dorsey/Library/Application Support /Alfred 2 … But, when I try to use the workflow, the next entry I make gets a response of "Please provide your WA AppID. I re-installed your workflow and still get this response. What should I try next? Thanks! I updated the workflow; I looked through my code and found a bunch of junk I forgot to clean up. Anyway, try installing it again. Thank you for your patience Link to comment
bpsooner Posted May 19, 2013 Share Posted May 19, 2013 Tyler, your changes in the workflow did the trick! Now it takes my AppID & retrieves information. Thanks a ton for taking time to re do your code! I very much appreciate it! bpsonner (American living in Budapest) Tyler Eich 1 Link to comment
gekkoh Posted June 30, 2013 Share Posted June 30, 2013 Amazing workflow, thank you so much! Tyler Eich 1 Link to comment
VadimV Posted July 27, 2014 Share Posted July 27, 2014 Hi Tyler, Your Workflow is splendid! I still have one question, could you help? When hitting ⌘, the pasted data into Growl includes more informations than the one pasted in the clipboard with ⌥ (I get only the main line displayed in Alfred). Is there any way to paste the result we get in Growl into the clipboard? (Maybe with another shortcut or by changing the ⌥ behavior) Thank you very much! Vadim Link to comment
Tyler Eich Posted July 28, 2014 Author Share Posted July 28, 2014 Hi Tyler, Your Workflow is splendid! I still have one question, could you help? When hitting ⌘, the pasted data into Growl includes more informations than the one pasted in the clipboard with ⌥ (I get only the main line displayed in Alfred). Is there any way to paste the result we get in Growl into the clipboard? (Maybe with another shortcut or by changing the ⌥ behavior) Thank you very much! Vadim Sure, you can edit the workflow to do this without much work on my end Basically, you're going to find the connection between a Run Script object and a Growl output. When you find this connection, simply add another connection between that Run Script object and a Copy to Clipboard output. On my end, the screenshot below does what I described above. If you don't want the Growl notification, simply delete the Growl object from the workflow VadimV 1 Link to comment
VadimV Posted July 28, 2014 Share Posted July 28, 2014 Sure, you can edit the workflow to do this without much work on my end Basically, you're going to find the connection between a Run Script object and a Growl output. When you find this connection, simply add another connection between that Run Script object and a Copy to Clipboard output. On my end, the screenshot below does what I described above. If you don't want the Growl notification, simply delete the Growl object from the workflow Thank you Tyler, worked perfectly! Have a good day! Tyler Eich 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now