Jump to content

Wolfram|Alpha workflow


Recommended Posts

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 by parekh
Link to comment

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:

  1. Open Alfred Preferences (open Alfred, hit ⌘-[comma]), navigate to Workflows > Wolfram|Alpha (in the left sidebar), and click it.
  2. Double click the connection to the 'Open URL' action and change the 'Action Modifier' to 'none'
  3. You can delete the Growl notification if you don't have Growl installed.

Here's a picture to help you out:

Image%202013.04.16%2010%3A42%3A19%20AM.p

Link to comment

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:

  1. Open Alfred Preferences (open Alfred, hit ⌘-[comma]), navigate to Workflows > Wolfram|Alpha (in the left sidebar), and click it.
  2. Double click the connection to the 'Open URL' action and change the 'Action Modifier' to 'none'
  3. You can delete the Growl notification if you don't have Growl installed.

Here's a picture to help you out:

Image%202013.04.16%2010%3A42%3A19%20AM.p

 

 

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

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  :)

Link to comment

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?

  1. Right click on the 'Wolfram|Alpha' entry and click 'Show in Finder'.
  2. Find 'setappid.php' in the resulting Finder window.
  3. Open Terminal and type: php -f <drag the setappid.php file here> -- 'test' (do not include < or >)
  4. Hit return and let me know what comes out  ;)

Thanks for your patience  :)

Link to comment

Hello!  :)

 

Could you try running the 'setappid.php' file in your Terminal?

  1. Right click on the 'Wolfram|Alpha' entry and click 'Show in Finder'.
  2. Find 'setappid.php' in the resulting Finder window.
  3. Open Terminal and type: php -f <drag the setappid.php file here> -- 'test' (do not include < or >)
  4. 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
  • 3 weeks later...

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 by benchinn
Link to comment

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

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 by jiku
Link to comment

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

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

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..... :unsure:

Link to comment

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

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

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
  • 1 month later...
  • 1 year later...

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

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 ;)

Image%202014-07-27%20at%208.38.48%20PM.p

Link to comment

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!  :D

 

Have a good day!

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...