Hello.
I have had a look at it, and it may be possible, but it just isn’t worth it, You can download a widget from here Wolram Mac Os X Widget.
In order to get the data out, you have to effectively query the Wolfram Alpha site, with Java Script, not a single result are rendered in the source of the document.
What I can provide for you, is a dialog to enter the question in for Wolfram Alpha, and leave you at Wolfram Alpha’s page.
Just tell me if you are interested. That one, is tried, thanks to Yvan Koenig.
Edit: Here you are, for your own convenience, you should try to copy and paste a result from their webpage.
on run
set dialogResponse to display dialog "Your for:)mula please ?" default answer "Number of AppleScript Users"
set theFormula to text returned of dialogResponse
if theFormula is "" then error number -128
set windowTitle to theFormula & " - Wolfram|Alpha"
set theFormula to my hideQuotes(theFormula)
set theFormula to do shell script "echo " & quote & "<?PHP echo urlencode(" & quoted form of theFormula & ") ; ?>" & quote & " | php"
set theFormula to my unhideQuotes(theFormula)
tell application "Safari"
activate
if exists window windowTitle then close window windowTitle
open location "http://www.wolframalpha.com/input/?i=" & theFormula
repeat until name of window 1 is windowTitle
delay 1
end repeat
end tell -- Safari
end run
on hideQuotes(f)
local exchanges, i, j
set exchanges to {{"'", "¹¹"}, {quote, "««"}}
repeat with i from 1 to count of exchanges
set j to item 1 of item i of exchanges
if f contains j then set f to my remplace(f, j, item 2 of item i of exchanges)
end repeat
return f
end hideQuotes
--=====
on unhideQuotes(f)
local exchanges, i, j
set exchanges to {{"%E2%80%B9%E2%80%B9", "%27"}, {"%C2%AB%C2%AB", "%22"}}
repeat with i from 1 to count of exchanges
set j to item 1 of item i of exchanges
if f contains j then set f to my remplace(f, j, item 2 of item i of exchanges)
end repeat
return f
end unhideQuotes
--=====
(*
replaces every occurences of d1 by d2 in the text t
*)
on remplace(t, d1, d2)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d1
set l to text items of t
set AppleScript's text item delimiters to d2
set t to l as text
set AppleScript's text item delimiters to oTIDs
return t
end remplace
--=====