Sign in to follow this  
Followers 0
Rawox

I can't find a solution...

6 posts in this topic

#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>


$Window = GUICreate ( "The Love Tester", 325, 140 )
    GUICtrlCreateLabel ( "Name 1:", 10, 7 )
    GUICtrlCreateLabel ( "Name 2:", 165, 7 )
    $Name1 = GUICtrlCreateInput ( "", 10, 24, 150, 20  )
    $Name2 = GUICtrlCreateInput ( "", 165, 24, 150, 20 )
    $Calculate = GUICtrlCreateButton ( "Calculate the love!", 10, 50, 305, 25 )
    $Slider1 = GUICtrlCreateSlider ( 10, 80, 305, 30, BitOr ( $TBS_NOTICKS, $GUI_DISABLE ) )
    GUICtrlCreateLabel ( "The result:", 18, 115 )
    
    $ResultLabel = GUICtrlCreateLabel ( "", 100, 115, 2000, 2000 )
    GUICtrlSetFont ( $ResultLabel, 8.5, 600 )
    GUICtrlSetLimit ( -1, 200, 0 )
GUISetState ( @SW_SHOW, $Window )
                
While 1
    $nMsg = GUIGetMsg()
        Select
        Case $nMsg = $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $Calculate
            If $Name1 = "Henk" Then
                MsgBox(4096,"", "Henk")
            ElseIf $Name1 = "Cas" Then
                MsgBox(4096,"", "Cas.")
            Else
                If $Name1 = "" And $Name2 = "" Then
                    MsgBox(4096,"", "Empty!")
                Else
                    MsgBox(4096,"", "Unknown")
                EndIf
            EndIf
    EndSelect
WEnd

Does anyone know why this isn't working? I just can't figure it out...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Define isn't working.

By isn't working you mean that it's not reading your input boxes?

in your while loop replace $name1 with guictrlread($name1) and see what happens

Edited by youknowwho4eva

Giggity

Share this post


Link to post
Share on other sites

Well, maybe it's stupid... but that didn't really help me :D

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Whoops :D Stupid!

Share this post


Link to post
Share on other sites

All I was saying is that saying a script isn't working is very vague. Next time say, I don't see why it only returns unknown.

Technically the script was working


Giggity

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  
Followers 0