Jump to content
Sign in to follow this  

Update form info issue

Recommended Posts


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)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE

        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)

$AnswerArray[0] = $Answer;
GuiCtrlSetData ($Solution, $AnswerArray[0]);


Share this post

Link to post
Share on other sites

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.