Jump to content
Sign in to follow this  
Mike23

strange value's

Recommended Posts

Mike23

hi all,

i got 2 GUI's

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <StaticConstants.au3>

Global $Aantal_Speer, $Aantal_Zwaard 
Global $Coordinaat1, $Coordinaat2, $Coordinaat3, $Coordinaat4, $Coordinaat5, $Coordinaat6

Func Main_Menu()
    Local $Button_1, $Button_2, $msg
    GUICreate("Defense 0.1",220, 120)
    GUICtrlCreateLabel("Aantal Speer: ", 10, 15)
    $Aantal_Speer = GUICtrlCreateInput("", 120, 10, 50, 20)
    GUICtrlCreateLabel("Aantal Zwaard: ", 10, 45)
    $Aantal_Zwaard = GUICtrlCreateInput("", 120, 40, 50, 20)
    
 ;GUICtrlCreateGraphic(170, 175, 100, 100, $SS_ETCHEDFRAME )
        
    $Button_1 = GUICtrlCreateButton("Next", 65, 80,85,25)
        GUISetState(@SW_SHOW)    ; will display an  dialog box with 2 button

 

   ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $Button_1
                GUISetState(@SW_HIDE)
                Coordinaten()
        EndSelect
    WEnd
EndFunc

Func Coordinaten()
    Local $Coord_1, $Coord_2, $Coord_msg
    GUICreate("Defense 0.1" ,220, 250)
    GUICtrlCreateLabel("Coordinaten1: ", 10, 15)
    $Coordinaat1 = GUICtrlCreateInput("", 120, 10, 50, 20)
    GUICtrlCreateLabel("Coordinaten2: ", 10, 45)
    $Coordinaat2 = GUICtrlCreateInput("", 120, 40, 50, 20)
    
    GUICtrlCreateLabel("Coordinaten3: ", 10, 75)
    $Coordinaat3 = GUICtrlCreateInput("", 120, 70, 50, 20)
    GUICtrlCreateLabel("Coordinaten4: ", 10, 105)
    $Coordinaat4 = GUICtrlCreateInput("", 120, 100, 50, 20)
    
    GUICtrlCreateLabel("Coordinaten5: ", 10, 135)
    $Coordinaat5 = GUICtrlCreateInput("", 120, 130, 50, 20)
    GUICtrlCreateLabel("Coordinaten6: ", 10, 165)
    $Coordinaat6 = GUICtrlCreateInput("", 120, 160, 50, 20)
    
 ;GUICtrlCreateGraphic(170, 175, 100, 100, $SS_ETCHEDFRAME )
        
    $Coord_1 = GUICtrlCreateButton("Go", 10, 200,85,25)
    $Coord_2 = GUICtrlCreateButton("Back", 115, 200,85,25)
    
    GUISetState(@SW_SHOW)    ; will display an  dialog box with 2 button
   
   ; Run the GUI until the dialog is closed
    While 1
        $Coord_msg = GUIGetMsg()
        Select
            Case $Coord_msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $Coord_msg = $Coord_1
                $Message2 = ""
                $Message =  "Aantal Speer = "
                $Message2 &= $Message & $Aantal_Speer & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")

                $Message =  "Aantal Zwaard = "
                $Message2 &= $Message & $Aantal_Zwaard & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
                $Message =  "Coordinaat 1 = "
                $Message2 &= $Message & $Coordinaat1 & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
                
                $Message =  "Coordinaat 2 = "
                $Message2 &= $Message & $Coordinaat2 & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
                $Message =  "Coordinaat 3 = "
                $Message2 &= $Message & $Coordinaat3 & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
                $Message =  "Coordinaat 4 = "
                $Message2 &= $Message & $Coordinaat4 & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
                $Message =  "Coordinaat 5 = "
                $Message2 &= $Message & $Coordinaat5 & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
                $Message =  "Coordinaat 6 = "   
                $Message2 &= $Message & $Coordinaat6 & @LF
                SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")

            Case $Coord_msg = $Coord_2
                GUISetState(@SW_HIDE)
                Main_Menu()
                ExitLoop
                
        EndSelect
    WEnd
EndFunc

Gui1 has 2 boxes. (value's that wil be entered here are between 0 and 10.000)

and gui2 has 6. (value's that wil be entered here are always something like "000|000" with the | in between.)

i want to fill them in and show them with splashTextOn.

here starts my problem. value's that i get on screen don't come close to values i fill in. :D

anny1 know whats going wrong?? other help to tweak the code is welcome to love to learn new stuff

greetz, mike23.

Share this post


Link to post
Share on other sites
Mike23

ty it worked :D

just need to find out how to close the flash box now :S can't press the cross in the top site somehow.

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.