Sign in to follow this  
Followers 0
rrrm99

dunno how to fix

3 posts in this topic

#include <GuiConstants.au3>

GUICreate("MyGUI", 222, 384, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

GUICtrlCreateGroup("To", 20, 20, 190, 50)
$input1 = GUICtrlCreateInput("", 30, 40, 170, 20)
GUICtrlCreateGroup("From", 20, 80, 190, 50)
$input2 = GUICtrlCreateInput("", 30, 100, 170, 20)
GUICtrlCreateGroup("Subject", 20, 140, 190, 50)
$input3 = GUICtrlCreateInput("", 30, 160, 170, 20)
GUICtrlCreateGroup("Body", 20, 200, 190, 100)
$edit = GUICtrlCreateEdit("", 30, 220, 170, 70)
$Combo = GUICtrlCreateCombo("1", 20, 310, 70, 21)
GUICtrlSetData(-1, "2|3|4|5|6|7|8|9|10", "1")
$btn = GUICtrlCreateButton("Ok", 20, 350, 190, 20, $BS_icon)
GUICtrlSetImage(-1, "shell32.dll", 144, 0)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $btn
            Sleep(100)
            Func()
    EndSelect
WEnd

Global $Combo2 = GUICtrlRead($Combo)
Global Const $count = 0
Global $on = 1

Func Func()
    
    If $on = 1 Then
        Number($Combo2 - 1)
                                ; useless code...
        $on = 0
    EndIf

    While $Combo2 > $count
                               ; useless code...
                   Number($Combo2 - 1)
    WEnd

    If $combo2 > $count Then
        MsgBox(48, "", "")
    EndIf
EndFunc

it continues into a never ending loop(the While $combo >...Wend statement) for some reason

i have tried to fix this for weeks...

dont mind the vars in the gui...they are used in "useless code"

Share this post


Link to post
Share on other sites



#include <GuiConstants.au3>

GUICreate("MyGUI", 222, 384, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

GUICtrlCreateGroup("To", 20, 20, 190, 50)
$input1 = GUICtrlCreateInput("", 30, 40, 170, 20)
GUICtrlCreateGroup("From", 20, 80, 190, 50)
$input2 = GUICtrlCreateInput("", 30, 100, 170, 20)
GUICtrlCreateGroup("Subject", 20, 140, 190, 50)
$input3 = GUICtrlCreateInput("", 30, 160, 170, 20)
GUICtrlCreateGroup("Body", 20, 200, 190, 100)
$edit = GUICtrlCreateEdit("", 30, 220, 170, 70)
$Combo = GUICtrlCreateCombo("1", 20, 310, 70, 21)
GUICtrlSetData(-1, "2|3|4|5|6|7|8|9|10", "1")
$btn = GUICtrlCreateButton("Ok", 20, 350, 190, 20, $BS_icon)
GUICtrlSetImage(-1, "shell32.dll", 144, 0)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $btn
            Sleep(100)
Global $Combo2 = GUICtrlRead($Combo)
Global Const $count = 0
Global $on = 1
            Func1()
    EndSelect
WEnd

Func Func1()
   
    If $on = 1 Then
        $Combo2 -= 1
                                ; useless code...
        $on = 0
    EndIf

    While $Combo2 > $count
                               ; useless code...
                   $Combo2 -= 1
    WEnd

    If $combo2 > $count Then
        MsgBox(48, "", "")
    EndIf
EndFunc

Share this post


Link to post
Share on other sites

works thanks

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