Jump to content

Cant read gui....


Recommended Posts

Im trying to make a prgoram to help me study my riddiculously over-my-grade-level words... but it can't determine whats in the input!

#include <GuiConstants.au3>

GuiCreate("MyGUI", 192, 442,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GUICtrlCreateEdit("", 10, 10, 80, 20)
$Input_2 = GUICtrlCreateEdit("", 10, 40, 80, 20)
$Input_3 = GUICtrlCreateEdit("", 10, 70, 80, 20)
$Input_4 = GUICtrlCreateEdit("", 10, 100, 80, 20)
$Input_5 = GUICtrlCreateEdit("", 10, 130, 80, 20)
$Input_6 = GUICtrlCreateEdit("", 10, 160, 80, 20)
$Input_7 = GUICtrlCreateEdit("", 10, 190, 80, 20)
$Input_8 = GUICtrlCreateEdit("", 10, 220, 80, 20)
$Input_9 = GUICtrlCreateEdit("", 10, 250, 80, 20)
$Input_10 = GUICtrlCreateEdit("", 100, 10, 80, 20)
$Input_11 = GUICtrlCreateEdit("", 100, 40, 80, 20)
$Input_12 = GUICtrlCreateEdit("", 100, 70, 80, 20)
$Input_13 = GUICtrlCreateEdit("", 100, 100, 80, 20)
$Input_14 = GUICtrlCreateEdit("", 100, 130, 80, 20)
$Input_15 = GUICtrlCreateEdit("", 100, 160, 80, 20)
$Input_16 = GUICtrlCreateEdit("", 100, 190, 80, 20)
$Input_17 = GUICtrlCreateEdit("", 100, 220, 80, 20)
$Input_18 = GUICtrlCreateEdit("", 100, 250, 80, 20)
$Input_19 = GUICtrlCreateEdit("", 100, 280, 80, 20)
$Input_20 = GUICtrlCreateEdit("", 100, 310, 80, 20)
$Input_21 = GUICtrlCreateEdit("", 10, 280, 80, 20)
$Input_22 = GUICtrlCreateEdit("", 10, 310, 80, 20)
$Input_23 = GUICtrlCreateEdit("", 10, 340, 80, 20)
$Input_24 = GUICtrlCreateEdit("", 100, 340, 80, 20)
$Input_25 = GUICtrlCreateEdit("", 10, 370, 80, 20)
$Input_26 = GUICtrlCreateEdit("", 100, 370, 80, 20)
$Button_27 = GuiCtrlCreateButton("STUDY!", 10, 400, 170, 30)
$1=GUICtrlRead($Input_1)
$2=GUICtrlRead($Input_2)
$3=GUICtrlRead($Input_3)
$4=GUICtrlRead($Input_4)
$5=GUICtrlRead($Input_5)
$6=GUICtrlRead($Input_6)
$7=GUICtrlRead($Input_7)
$8=GUICtrlRead($Input_8)
$9=GUICtrlRead($Input_9)
$10=GUICtrlRead($Input_10)
$11=GUICtrlRead($Input_11)
$12=GUICtrlRead($Input_12)
$13=GUICtrlRead($Input_13)
$14=GUICtrlRead($Input_14)
$15=GUICtrlRead($Input_15)
$16=GUICtrlRead($Input_16)
$17=GUICtrlRead($Input_17)
$18=GUICtrlRead($Input_18)
$19=GUICtrlRead($Input_19)
$20=GUICtrlRead($Input_20)
$21=GUICtrlRead($Input_21)
$22=GUICtrlRead($Input_22)
$23=GUICtrlRead($Input_23)
$24=GUICtrlRead($Input_24)
$25=GUICtrlRead($Input_25)
$26=GUICtrlRead($Input_26)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
        
    Case $msg = $Button_27
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $1 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $1 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too :)
        EndIf
    EndIf
WEnd
;STOP
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;
    EndSelect
WEnd
Exit

so whats wrong with it???

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

#include <GuiConstants.au3>

GuiCreate("MyGUI", 192, 442,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GUICtrlCreateEdit("", 10, 10, 80, 20)
$Input_2 = GUICtrlCreateEdit("", 10, 40, 80, 20)
$Input_3 = GUICtrlCreateEdit("", 10, 70, 80, 20)
$Input_4 = GUICtrlCreateEdit("", 10, 100, 80, 20)
$Input_5 = GUICtrlCreateEdit("", 10, 130, 80, 20)
$Input_6 = GUICtrlCreateEdit("", 10, 160, 80, 20)
$Input_7 = GUICtrlCreateEdit("", 10, 190, 80, 20)
$Input_8 = GUICtrlCreateEdit("", 10, 220, 80, 20)
$Input_9 = GUICtrlCreateEdit("", 10, 250, 80, 20)
$Input_10 = GUICtrlCreateEdit("", 100, 10, 80, 20)
$Input_11 = GUICtrlCreateEdit("", 100, 40, 80, 20)
$Input_12 = GUICtrlCreateEdit("", 100, 70, 80, 20)
$Input_13 = GUICtrlCreateEdit("", 100, 100, 80, 20)
$Input_14 = GUICtrlCreateEdit("", 100, 130, 80, 20)
$Input_15 = GUICtrlCreateEdit("", 100, 160, 80, 20)
$Input_16 = GUICtrlCreateEdit("", 100, 190, 80, 20)
$Input_17 = GUICtrlCreateEdit("", 100, 220, 80, 20)
$Input_18 = GUICtrlCreateEdit("", 100, 250, 80, 20)
$Input_19 = GUICtrlCreateEdit("", 100, 280, 80, 20)
$Input_20 = GUICtrlCreateEdit("", 100, 310, 80, 20)
$Input_21 = GUICtrlCreateEdit("", 10, 280, 80, 20)
$Input_22 = GUICtrlCreateEdit("", 10, 310, 80, 20)
$Input_23 = GUICtrlCreateEdit("", 10, 340, 80, 20)
$Input_24 = GUICtrlCreateEdit("", 100, 340, 80, 20)
$Input_25 = GUICtrlCreateEdit("", 10, 370, 80, 20)
$Input_26 = GUICtrlCreateEdit("", 100, 370, 80, 20)
$Button_27 = GuiCtrlCreateButton("STUDY!", 10, 400, 170, 30)
GuiSetState()
While 1
$1=GUICtrlRead($Input_1)
$2=GUICtrlRead($Input_2)
$3=GUICtrlRead($Input_3)
$4=GUICtrlRead($Input_4)
$5=GUICtrlRead($Input_5)
$6=GUICtrlRead($Input_6)
$7=GUICtrlRead($Input_7)
$8=GUICtrlRead($Input_8)
$9=GUICtrlRead($Input_9)
$10=GUICtrlRead($Input_10)
$11=GUICtrlRead($Input_11)
$12=GUICtrlRead($Input_12)
$13=GUICtrlRead($Input_13)
$14=GUICtrlRead($Input_14)
$15=GUICtrlRead($Input_15)
$16=GUICtrlRead($Input_16)
$17=GUICtrlRead($Input_17)
$18=GUICtrlRead($Input_18)
$19=GUICtrlRead($Input_19)
$20=GUICtrlRead($Input_20)
$21=GUICtrlRead($Input_21)
$22=GUICtrlRead($Input_22)
$23=GUICtrlRead($Input_23)
$24=GUICtrlRead($Input_24)
$25=GUICtrlRead($Input_25)
$26=GUICtrlRead($Input_26)
    $msg = GuiGetMsg()
    Select
        
    Case $msg = $Button_27
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $1 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $1 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;
    EndSelect
WEnd
Exit

try that..

It was reading the controls, but it read it before the user had even a chance to type anything in them, so they always would return "".

Edited by CHRIS95219
Link to comment
Share on other sites

oooooh.. thank you!

Edit:

now how do i make it loop over and start again?:

#include <GuiConstants.au3>

GuiCreate("MyGUI", 192, 442,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GUICtrlCreateEdit("", 10, 10, 80, 20)
$Input_2 = GUICtrlCreateEdit("", 10, 40, 80, 20)
$Input_3 = GUICtrlCreateEdit("", 10, 70, 80, 20)
$Input_4 = GUICtrlCreateEdit("", 10, 100, 80, 20)
$Input_5 = GUICtrlCreateEdit("", 10, 130, 80, 20)
$Input_6 = GUICtrlCreateEdit("", 10, 160, 80, 20)
$Input_7 = GUICtrlCreateEdit("", 10, 190, 80, 20)
$Input_8 = GUICtrlCreateEdit("", 10, 220, 80, 20)
$Input_9 = GUICtrlCreateEdit("", 10, 250, 80, 20)
$Input_10 = GUICtrlCreateEdit("", 100, 10, 80, 20)
$Input_11 = GUICtrlCreateEdit("", 100, 40, 80, 20)
$Input_12 = GUICtrlCreateEdit("", 100, 70, 80, 20)
$Input_13 = GUICtrlCreateEdit("", 100, 100, 80, 20)
$Input_14 = GUICtrlCreateEdit("", 100, 130, 80, 20)
$Input_15 = GUICtrlCreateEdit("", 100, 160, 80, 20)
$Input_16 = GUICtrlCreateEdit("", 100, 190, 80, 20)
$Input_17 = GUICtrlCreateEdit("", 100, 220, 80, 20)
$Input_18 = GUICtrlCreateEdit("", 100, 250, 80, 20)
$Input_19 = GUICtrlCreateEdit("", 100, 280, 80, 20)
$Input_20 = GUICtrlCreateEdit("", 100, 310, 80, 20)
$Input_21 = GUICtrlCreateEdit("", 10, 280, 80, 20)
$Input_22 = GUICtrlCreateEdit("", 10, 310, 80, 20)
$Input_23 = GUICtrlCreateEdit("", 10, 340, 80, 20)
$Input_24 = GUICtrlCreateEdit("", 100, 340, 80, 20)
$Input_25 = GUICtrlCreateEdit("", 10, 370, 80, 20)
$Input_26 = GUICtrlCreateEdit("", 100, 370, 80, 20)
$Button_27 = GuiCtrlCreateButton("STUDY!", 10, 400, 170, 30)
GuiSetState()
While 1
$1=GUICtrlRead($Input_1)
$2=GUICtrlRead($Input_2)
$3=GUICtrlRead($Input_3)
$4=GUICtrlRead($Input_4)
$5=GUICtrlRead($Input_5)
$6=GUICtrlRead($Input_6)
$7=GUICtrlRead($Input_7)
$8=GUICtrlRead($Input_8)
$9=GUICtrlRead($Input_9)
$10=GUICtrlRead($Input_10)
$11=GUICtrlRead($Input_11)
$12=GUICtrlRead($Input_12)
$13=GUICtrlRead($Input_13)
$14=GUICtrlRead($Input_14)
$15=GUICtrlRead($Input_15)
$16=GUICtrlRead($Input_16)
$17=GUICtrlRead($Input_17)
$18=GUICtrlRead($Input_18)
$19=GUICtrlRead($Input_19)
$20=GUICtrlRead($Input_20)
$21=GUICtrlRead($Input_21)
$22=GUICtrlRead($Input_22)
$23=GUICtrlRead($Input_23)
$24=GUICtrlRead($Input_24)
$25=GUICtrlRead($Input_25)
$26=GUICtrlRead($Input_26)
    $msg = GuiGetMsg()
    Select
        
    Case $msg = $Button_27
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $1 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $1 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $2 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $2 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $3 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $3 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $4 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $4 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
;STOP
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $5 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $5 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $6 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $6 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $7 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $7 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $8 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $8 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $9 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $9 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $10 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $10 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $11 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $11 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $12 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $12 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $13 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $13 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $14 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $14 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $15 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $15 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $16 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $16 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $17 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $17 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $18 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $18 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $9 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $19 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $20 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $20 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $21 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $21 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $22 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $22 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $23 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $23 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $24 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $24 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $25 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $25 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
$bLoop = 1
While $bLoop = 1
    $text = InputBox("Spelling", "Please type in the word " & $26 & " and click OK")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        ; They clicked OK, but did they type the right thing?
        If $text <> $26 Then
            MsgBox(4096, "Error", "Try again!")
        Else
            $bLoop = 0    ; Exit the loop - ExitLoop would have been an alternative too 
        EndIf
    EndIf
WEnd
;STOP
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;
    EndSelect
WEnd
Exit
Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

i DONT know how to use those...im not very smart at auto it, but i can make games and stuff, but small luxuries like that i dont not know how to obtain...

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...