Medic873 Posted February 3, 2011 Share Posted February 3, 2011 why dosnt this work how it should #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <INet.au3> #Region ### START Koda GUI section ### Form= $Answer = "Answer will appear here." $Form1 = GUICreate("Math Solver", 199, 89, 192, 124) $Question = GUICtrlCreateInput("Question", 8, 8, 177, 21) $ButtonSolver = GUICtrlCreateButton("Answer", 8, 32, 179, 25, $WS_GROUP) $Solution = GUICtrlCreateLabel($Answer, 8, 64, 180, 20) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ButtonSolver $URL = StringReplace ($Question , "+" , "%2B") $URL1 = StringReplace ($URL , "=" , "%3D") $Source = _inetgetsource ("http://www.wolframalpha.com/input/?i=" & $URL1) $AnswerArray = StringRegExp ($Source , 'id="i_0200_1" alt="(.*?)"' , 1) if not isarray($AnswerArray) Then $AnswerArray = StringRegExp ($Source , 'id="i_0300_1" alt="(.*?)"' , 1) Endif $AnswerArray[0] = $Answer; GuiCtrlSetData ($Solution, $AnswerArray[0]); EndSwitch WEnd Link to comment Share on other sites More sharing options...
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