Jump to content

Need GUI help! please! I am stuck...


 Share

Recommended Posts

hi,

can someone help me to create the GUI loop:

While 1
                            $msg2 = GUIGetMsg()
                            Select
                                Case $msg2 = $buttonnext
                                    $p1 = GUICtrlRead($input1)
                                    $p2 = GUICtrlRead($input2)
                                    $p3 = GUICtrlRead($input3)
                                    $p4 = GUICtrlRead($input4)
                                    $p5 = GUICtrlRead($input5)
                                    $p6 = GUICtrlRead($input6)
                                    $p7 = GUICtrlRead($input7)
                                    $p8 = GUICtrlRead($input8)
                                    $p9 = GUICtrlRead($input9)
                                    $p10 = GUICtrlRead($input10)
                                    $p11 = GUICtrlRead($input11)
                                    $p12 = GUICtrlRead($input12)
                                    GUICtrlDelete($input1)
                                    GUICtrlDelete($input2)
                                    GUICtrlDelete($input3)
                                    GUICtrlDelete($input4)
                                    GUICtrlDelete($input5)
                                    GUICtrlDelete($input6)
                                    GUICtrlDelete($input7)
                                    GUICtrlDelete($input8)
                                    GUICtrlDelete($input9)
                                    GUICtrlDelete($input10)
                                    GUICtrlDelete($input11)
                                    GUICtrlDelete($input12)
                                    GUICtrlDelete($label1)
                                    GUICtrlDelete($ppp)
                                    GUICtrlDelete($buttonchange)
                                    $lable3 = GUICtrlCreateLabel("please Insert new lables then press Prev", 10, 10)
                                    $label2 = GUICtrlCreateLabel("Page-2", 120, 40)
                                    GUICtrlDelete($buttonnext)
                                    $prev = GUICtrlCreateButton("Prev", 250, 410)
                                    $input1 = GUICtrlCreateInput($q1, 205, 135, 90, 15)
                                    $input2 = GUICtrlCreateInput($q2, 205, 155, 90, 15)
                                    $input3 = GUICtrlCreateInput($q3, 205, 175, 90, 15)
                                    $input4 = GUICtrlCreateInput($q4, 205, 195, 90, 15)
                                    $input5 = GUICtrlCreateInput($q5, 205, 215, 90, 15)
                                    $input6 = GUICtrlCreateInput($q6, 205, 235, 90, 15)
                                    $input7 = GUICtrlCreateInput($q7, 205, 255, 90, 15)
                                    $input8 = GUICtrlCreateInput($q8, 205, 275, 90, 15)
                                    $input9 = GUICtrlCreateInput($q9, 205, 295, 90, 15)
                                    $input10 = GUICtrlCreateInput($q10, 205, 315, 90, 15)
                                    $input11 = GUICtrlCreateInput($q11, 205, 335, 90, 15)
                                    $input12 = GUICtrlCreateInput($q12, 205, 355, 90, 15)
                                    
                                Case $msg2 = $prev
                                    $q1 = GUICtrlRead($input1)
                                    $q2 = GUICtrlRead($input2)
                                    $q3 = GUICtrlRead($input3)
                                    $q4 = GUICtrlRead($input4)
                                    $q5 = GUICtrlRead($input5)
                                    $q6 = GUICtrlRead($input6)
                                    $q7 = GUICtrlRead($input7)
                                    $q8 = GUICtrlRead($input8)
                                    $q9 = GUICtrlRead($input9)
                                    $q10 = GUICtrlRead($input10)
                                    $q11 = GUICtrlRead($input11)
                                    $q12 = GUICtrlRead($input12)
                                    GUICtrlDelete($input1)
                                    GUICtrlDelete($input2)
                                    GUICtrlDelete($input3)
                                    GUICtrlDelete($input4)
                                    GUICtrlDelete($input5)
                                    GUICtrlDelete($input6)
                                    GUICtrlDelete($input7)
                                    GUICtrlDelete($input8)
                                    GUICtrlDelete($input9)
                                    GUICtrlDelete($input10)
                                    GUICtrlDelete($input11)
                                    GUICtrlDelete($input12)
                                    GUICtrlDelete($label2)
                                    GUICtrlDelete($lable3)
                                    $label1 = GUICtrlCreateLabel("Page-1", 120, 40)
                                    $lable3 = GUICtrlCreateLabel("You can now press Change to Modify", 10, 10)
                                    GUICtrlDelete($prev)
                                    $buttonnext = GUICtrlCreateButton("Next", 220, 410)
                                    $buttonchange = GUICtrlCreateButton("Change", 250, 20)
                                    $label1 = GUICtrlCreateLabel("Page-1", 120, 40)
                                    $input1 = GUICtrlCreateInput($p1, 205, 135, 90, 15)
                                    $input2 = GUICtrlCreateInput($p2, 205, 155, 90, 15)
                                    $input3 = GUICtrlCreateInput($p3, 205, 175, 90, 15)
                                    $input4 = GUICtrlCreateInput($p4, 205, 195, 90, 15)
                                    $input5 = GUICtrlCreateInput($p5, 205, 215, 90, 15)
                                    $input6 = GUICtrlCreateInput($p6, 205, 235, 90, 15)
                                    $input7 = GUICtrlCreateInput($p7, 205, 255, 90, 15)
                                    $input8 = GUICtrlCreateInput($p8, 205, 275, 90, 15)
                                    $input9 = GUICtrlCreateInput($p9, 205, 295, 90, 15)
                                    $input10 = GUICtrlCreateInput($p10, 205, 315, 90, 15)
                                    $input11 = GUICtrlCreateInput($p11, 205, 335, 90, 15)
                                    $input12 = GUICtrlCreateInput($p12, 205, 355, 90, 15)
                                    While 1
                                        $msg3 = GUIGetMsg()
                                        
                                        Select
                                            Case $msg3 = $buttonchange
                                                MsgBox(0, "works", "")
                                            Case $msg3 = $buttonnext
                                            ;need to return back to $msg2=$buttonnext how ???
                                        EndSelect
                                        
                                    WEnd
                                    
                                    
                                Case $msg2 = $GUI_EVENT_CLOSE
                                    GUIDelete($gui2)
                                    ExitLoop
                            EndSelect
                            
                        WEnd

I need to return to $msg2=$buttonnext if $msg3 equal to $buttonnext (pressed again). it works, but only if I press on "Next" twice. can't get out of the loop the first hit.

Link to comment
Share on other sites

I gues your problem is, that u don't use Subroutines. If you would turn to use the 2. Looper in an Subroutine, you could easly return the a value...

But i am not quite shure if i understood your question right...

never mind I got it working!!!!

:D

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...