topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 26, 2018, 01:20 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Alias: WolframAlpha Search  (Read 14501 times)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,260
    • View Profile
    • Donate to Member
Alias: WolframAlpha Search
« on: May 20, 2009, 09:36 PM »
An an aside: How about someone make us a farr alias to search wolfram alpha?

as requested by mouser. i realize that their service is still in alpha stage. so this is a good time as any to try out. :)

ws-farr-alias-wolfram-1.png
thanks to [user]hamradio[/user] for the icon.


edit1: fixed the encoding bug, thanks to oioisaveloy.
« Last Edit: May 30, 2009, 10:16 AM by lanux128 »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #1 on: May 24, 2009, 02:21 AM »
Sorry i didn't reply to this earlier -- great stuff, thank you  :up:

oioisaveloy

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #2 on: May 30, 2009, 08:32 AM »
This seems to have a problem with the plus sign: for example 5+6 gives the answer 30  ;D

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #3 on: May 30, 2009, 08:42 AM »
hahaha nice catch oiosaveloy  ;D

lanux, to fix it change the alias from:
    <AliasEntry>
        <AliasText>WolframAlpha</AliasText>
        <Score>1000</Score>
        <Regex>^wa (.*)</Regex>
        <Results>
            <Result>WolframAlpha: $$1 | http://www.wolframalpha.com/input/?i=$$1 /ICON=icons\wolframalpha.ico</Result>
        </Results>
    </AliasEntry>
to:
    <AliasEntry>
        <AliasText>WolframAlpha</AliasText>
        <Score>1000</Score>
        <Regex>^wa (.*)</Regex>
        <Results>
            <Result>WolframAlpha: $$1 | http://www.wolframalpha.com/input/?i=$$u1 /ICON=icons\wolframalpha.ico</Result>
        </Results>
    </AliasEntry>

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #4 on: May 30, 2009, 08:43 AM »
the use of $$u1 instead of $$1 when calling the url tells farr to urlencode the arguement which survives the browser call properly.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,260
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #5 on: May 30, 2009, 10:19 AM »
no problem, the encoding bug is fixed. download the alias from the OP or get the update from DcUpdater. ;)

oioisaveloy

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #6 on: May 31, 2009, 05:49 AM »
Thanks guys, the update works great  8)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #7 on: August 16, 2010, 12:23 PM »
Note, if you want the result from wolfram alpha to display directly in your farr window, and not open your browser to show it, you can easily do that by changing the alias result from:
WolframAlpha: $$1 | http://www.wolframalpha.com/input/?i=$$u1 /ICON=icons\wolframalpha.ico
to:
WolframAlpha: $$1 | htmlviewurl http://www.wolframalpha.com/input/?i=$$u1 /ICON=icons\wolframalpha.ico

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,559
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #8 on: August 16, 2010, 01:38 PM »
For calculations you can type in using C syntax, I've been using this little utility for years:

http://analogx.com/c...g/pcalc/Freeware.htm

The result is shown simultaneously in Float Hex Octal Integer and Binary.  To copy the one you want to the clipboard there's a little 'C' button to the right of it.  Also you can use variables.

Just thought many people may not be aware of it. :)

pcalc.jpg

Vanav

  • Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #9 on: May 01, 2018, 08:22 AM »
Note, if you want the result from wolfram alpha to display directly in your farr window, and not open your browser to show it, you can easily do that by changing the alias result from:
WolframAlpha: $$1 | http://www.wolframalpha.com/input/?i=$$u1 /ICON=icons\wolframalpha.ico
to:
WolframAlpha: $$1 | htmlviewurl http://www.wolframalpha.com/input/?i=$$u1 /ICON=icons\wolframalpha.ico
htmlviewurl and $$u1 seems doesn't work together, say, "+" sign is still lost. Is it a bug?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #10 on: May 01, 2018, 09:17 AM »
Maybe the + sign is being lost of encoded wrongly.  Can you see what it puts in the url where your + sign should be?

Vanav

  • Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #11 on: May 01, 2018, 11:51 AM »
Maybe the + sign is being lost of encoded wrongly.  Can you see what it puts in the url where your + sign should be?
Alias:
htmlviewurl http://www.wolframalpha.com/input/?i=$$u1 /ICON=icons\wolframalpha.ico
Input: "wa 2+3"
Target path:
htmlviewurl http://www.wolframalpha.com/input/?i=2%2b3
I press Enter, got embed browser, right click, Properties, Address: http://www.wolframalpha.com/input/?i=2+3

So, URL encoding is somehow lost if using embed browser.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #12 on: May 01, 2018, 11:55 AM »
Can you clarify what you are saying -- I didn't quite understand.

rgdot

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 2,080
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #13 on: May 01, 2018, 12:11 PM »
2+3 becomes 2%2b3 is what I think he is saying.

Vanav

  • Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #14 on: May 01, 2018, 12:22 PM »
If I create an alias:
htmlviewurl http://www.wolframalpha.com/input/?i=$$u1
it will not work correctly: for input "2+3" it will open inline browser with URL http://www.wolframalpha.com/input/?i=2+3, that is not correct: "+" sign is lost because it is not escaped (click URL to check).

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 9,715
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #15 on: May 01, 2018, 02:48 PM »
So, downloaded plug-in and took a look at the alias file.  The command is

Code: Text [Select]
  1. http://www.wolframalpha.com/input/?i=$$u1

So it takes the input verbatim, and doesn't do anything with it other than add it to the end of the url.

Is there any facility for processing the input without making a plugin, mouser?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #16 on: May 03, 2018, 08:09 AM »
Is there any facility for processing the input without making a plugin, mouser?
No, but if i am understanding vanav correctly, the call to htmlviewurl is not urlencoding the + sign, though it is being properly handled when launching an external web browser window -- is that correct?
If so, it's a bug that I should be able to fix.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #17 on: May 03, 2018, 08:12 AM »
Ok I have tested and confirmed the bug.. Let me try to fix.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #18 on: May 03, 2018, 08:36 AM »
Please try this beta:

The problem should be fixed and both launching the url in external browser and internal browser with htmlviewurl should now work.

The problem had to do with internal urls not obeying the urlencoding.. Now hopefully my fix won't mess up other aliases that use htmlviewurl that may have used other workarounds -- it's more likely it will fix them in these cases too.  But if for some reason it does we can either fix them or use some alternate form of htmlviewurl2, etc.

Vanav

  • Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #19 on: May 03, 2018, 05:43 PM »
The problem should be fixed and both launching the url in external browser and internal browser with htmlviewurl should now work.
Bug is fixed, thank you!

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,839
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Alias: WolframAlpha Search
« Reply #20 on: May 03, 2018, 05:46 PM »
Thanks for being so patient  :up: